SysConf_Jet_*

It is used to configure various Jet platform functions.

Most values are predefined or set in the application initialization and normally do not need to be set. However, it is definitely a good idea to be familiar with the setting options.

In the default structure of the application, the settings are made in the ~/application/config/Jet.php script, or wherever they are needed, for example in the initializer.

SysConf_Jet_Debug

Getter / Setter Meaning of
getDevelMode
setDevelMode
Determines whether developer mode is on/off. The application can be controlled accordingly. In practice, for example, it turns on/off displaying errors on output, cache, packers and so on.

The application can use this value wherever the developer sees fit. Example: you have an e-shop and a payment gateway that has a test and production interface. You can use this flag to switch between them. 
getDebugProfilerEnabled setDebugProfilerEnabled Turns on/off profiler

SysConf_Jet_Autoloader

Getter / Setter Meaning of
getCacheEnabled
setCacheEnabled
Enables/disables Autoloader cache (automatic class loading)
getApplicationAutoloadersDirName
setApplicationAutoloadersDirName
You can set the directory name with Autoloaders of the application. See the default application structure.

Default value: 'Autoloaders'.
getLibraryAutoloaderFileName
setLibraryAutoloaderFileName
The file name of library Autoloader can be set.

Default value: 'JetAutoloader.php'

SysConf_Jet_MVC

MVC in Jet is a topic in itself. The explanation of each option is brief, and it's important to familiarize yourself with how MVC in Jet works.

Getter / Setter Meaning of
getCacheEnabled
setCacheEnabled
Turns on/off the MVC cache.
getUseModulePages
setUseModulePages
Enables/disables the use of pages whose definitions are part of modules and not bases. May be useful for an application where you have decided not to use modules.

On by default.
getPageDataFileName
setPageDataFileName
If you want, you can change the names of the files containing the page definitions.

Default value: 'page_data.php'
getBaseDataFileName
setBaseDataFileName
If you want, you can change the names of the files containing the base definitions.

Default value: 'base_data.php'
getBasePagesDir
setBasePagesDir
Sets the name of the subdirectory (not the absolute path) containing the page definitions within the base definition.

Default value: 'pages'
getBaseLayoutsDir
setBaseLayoutsDir
Sets the name of the subdirectory (not the absolute path) containing the layouts within the base definition.

Default value: 'layouts'
getBaseViewsDir
setBaseViewsDir
Sets the name of the subdirectory (not the absolute path) containing the generic view within the base definition.

Default value: 'views'
getForceSlashOnURLEnd
setForceSlashOnURLEnd
You can control whether the system requires slashes ('/') at the end of URLs

Default off

SysConf_Jet_MVC_View

Getter / Setter Meaning of
getScriptFileSuffix
setScriptFileSuffix
Sets the extension that the view scripts will have.

Default value: 'phtml'
getAddScriptPathInfo
setAddScriptPathInfo
Enables a function that adds information to the generated output in which view script it was generated in the form of HTML comments containing the path to the given view script.

Can be useful during development.

In a production environment, the feature must definitely be disabled.

Disabled by default

SysConf_Jet_PackageCreator_CSS

Getter / Setter Meaning of
getEnabled
setEnabled
Turns on/off the packager.
getPackagesDirName
setPackagesDirName
Sets the name of the directory (not the full path) where the generated packages will be stored.

The default value is 'packages'.

SysConf_Jet_PackageCreator_JavaScript

Getter / Setter Meaning of
getEnabled
setEnabled
Turns on/off the packager.
getPackagesDirName
setPackagesDirName
Sets the name of the directory (not the full path) where the generated packages will be stored.

The default value is 'packages'.

SysConf_Jet_Http

Getter / Setter Meaning of
getHideRequest
setHideRequest
Enables/disables a function that eliminates the classic PHP superglobal variables $_POST and $_GET. If this function is enabled (it is by default), accessing these variables causes a Jet\Http_Request_Exception

The developer is simply forced to use the appropriate methods to access GET and POST. For example:

$id Http_Request::GET()->getInt('id'); This is one of the means and efforts to improve the security of the online application.

Default enabled
getHttpVersion
setHttpVersion
Sets the version of the http protocol used, especially for generating headers.

Default value: 1.1
getResponseMessages
setResponseMessages
Sets the map of http return codes and their text interpretation. This is an associated field where the key is the code and the value is the text.
getHeaderFunctionName
setHeaderFunctionName
Sets the name of the function that actually performs the deforestation of http response headers back to the client.

Useful for example for unit tests and the like.

Default value: '\header'

SysConf_Jet_ErrorPages

Getter / Setter Meaning of
getErrorPagesDir
setErrorPagesDir
Sets the directory (its full path) in which the view scripts of error pages (404, 401, and so on) are located.

By default, the value is not set.

Specifically for calls from the base initializer.

SysConf_Jet_Translator

Getter/Setter Meaning of
getAutoAppendUnknownPhrase
setAutoAppendUnknownPhrase
Specifies whether translator can automatically add newly found phrases to the dictionary - effectively editing dictionary files on the fly.

This feature is supposed to be enabled in a test environment and it is better to have it disabled on a production environment. An incomplete dictionary should not occur on a production environment.

SysConf_Jet_IO

Getter/Setter Meaning of
setFileMod Sets the default mode for newly created files (mode = unix permissions)
getExtensionsMimesMap
setExtensionsMimesMap
Jet tries to work with MIME file types primarily using finfo.

Of course, there may be situations where this doesn't work as you expect and you need to map the MIME file type with a conventional cet using an extension.
If this situation happens, you have the option to set your own map of extensions (associated field key) and types (field value).

By default, no map is set.

SysConf_Jet_Mailing

Getter / Setter Meaning of
getTemplatesDir
setTemplatesDir
Sets the absolute path to the directory where the mail templates are located.

By default, nothing is set and the value must be set.

In the sample application, the setting is done in ~/application/config/Jet.php and the value is ~/application/email-templates/

Of course, you can change this as needed. For example, set the value up in the base initializer and so on.

SysConf_Jet_DataListing

Getter/Setter Meaning of
getPaginationPageNoGetParam
setPaginationPageNoGetParam
Sets the name of the GET parameter, that specifies the page number in the lists.

Default: 'p'
getPaginationItemsPerPageParam
setPaginationItemsPerPageParam
Sets the name of a GET parameter that can determine how many items to display on a list page.

Default value: 'items_per_page'
getPaginationMaxItemsPerPage
setPaginationMaxItemsPerPage
Sets the upper limit on the number of items per list page.

Default value: 500
getPaginationDefaultItemsPerPage
setPaginationDefaultItemsPerPage
Sets the default number of list items per page.

Default value: 50
getSortGetParam
setSortGetParam
Sets the name of the GET parameter that determines the sorting of the list.

Default value: 'sort'

SysConf_Jet_Data_Paginator

Getter / Setter Meaning of
getMaxItemsPerPage
setMaxItemsPerPage
Sets the maximum number of items per page in the general paginator.

Default value: 500

SysConf_Jet_REST

Getter / Setter Meaning of
getPageGetParam
setPageGetParam
Sets the name of the GET parameter that determines the page number when working with lists of items.

Default value: 'page'
getSortGetParam
setSortGetParam
Sets the name of the GET parameter that determines the data sorting.

Default value: 'sort'
getItemsPerPageGetParam
setItemsPerPageGetParam
Sets the name of the GET parameter that can specify how many items should be returned within one page of sensor data.

Default value: 'items_per_page'
getDefaultItemsPerPage
setDefaultItemsPerPage
Sets the default number of items on the data list page.

Default value: 20
getMaxItemsPerPage
setMaxItemsPerPage
Sets the maximum configurable number of items on one page of the data list.

Default value: 100
getErrors
setErrors
defineError
Manages the error definitions used by the REST server.

It is possible to define both the whole set of errors and to change/add error states individually.

Default value: $errors = [
REST::ERR_CODE_AUTHORIZATION_REQUIRED => [
    
Http_Headers::CODE_401_UNAUTHORIZED,
    
'Access denied! Authorization required! ',
],
REST::ERR_CODE_ACCESS_DENIED          => [
    
Http_Headers::CODE_401_UNAUTHORIZED,
    
'Access denied! Insufficient permissions! ',
],
REST::ERR_CODE_VALIDATION_ERROR       => [
    
Http_Headers::CODE_400_BAD_REQUEST,
    
'Validation error',
],
REST::ERR_CODE_REQUEST_ERROR          => [
    
Http_Headers::CODE_400_BAD_REQUEST,
    
'Bad request'
],
REST::ERR_CODE_UNKNOWN_ITEM           => [
    
Http_Headers::CODE_404_NOT_FOUND,
    
'Unknown item'
],
REST::ERR_CODE_COMMON                 => [
    
Http_Headers::CODE_400_BAD_REQUEST,
    
'Common error'
]];
 

SysConf_Jet_UI

Getter / Setter Meaning of
getViewsDir
setViewsDir
Sets the directory (absolute path) where the view scripts for displaying UI elements are located.

No default value is set and must be set. This is done, for example, in base initializers.
getMessageSessionNamespace
setMessageSessionNamespace
Sets the session namespace where messages to be displayed to the user on the next page view (usually after redirection) will be stored.

Default value: '_jsa_ui_messages'

SysConf_Jet_UI_DefaultViews

Getter / Setter Význam
get(
string $element,
string $view='main'
) : void

set(
string $element,
string $view,
string $value
) : void
Sets the names of view scripts for individual UI elements.

There are many elements and they can be added. So it doesn't make sense to make a custom getter and setter for each one. The

methods are common with the element resolution and view script type.

SysConf_Jet_Form

Getter / Setter Význam
getDefaultSentKey
setDefaultSentKey
Sets the name of the key (in practice the value of the POST or GET parameter) that determines that the form was sent.

Default value: '_jet_form_sent_'
getDefaultViewsDir
setDefaultViewsDir
Sets the absolute path to the directory where the view scripts for displaying form elements are located.

No default value is set and must be set. This happens, for example, in base initializers.
getCSRFProtection_SessionNamePrefix
setCSRFProtection_SessionNamePrefix
Sets the session name prefix for CSRF protection.

The default value is: CSRFProtection/
getCSRFProtection_TokenFieldName
setCSRFProtection_TokenFieldName
Sets the form port name for the CSRF token.

The default value is: _CSRF_token_
getCSRFProtection_TokenGenerator
setCSRFProtection_TokenGenerator
Sets and possibly returns the default CSRF token generator.

SysConf_Jet_Form_DefaultViews

Getter / Setter Meaning of
get( 
string $element, 
string $view
) : string
Returns the names of the default view scripts for each form element.

There are many types of fields and elements (parts of the output) and they can be added (you can create more). So it doesn't make sense to make a custom getter and setter for each element for each field type, for example, so there is one common configuration of view scripts for forms.
set( 
string $element, 
string $view, 
string $value 
) : void

Sets the view names of the default scripts for each form element.

SysConf_Jet_Modules

Getter / Setter Meaning of
getInstallDirectory
setInstallDirectory
Sets the name of the directory used for installation scripts and installation data.

Default value: '_install'
getInstallScript
setInstallScript
Sets the name of the installation script.

Default value: 'install.php'
getUninstallScript
setUninstallScript
Sets the name of the uninstall script.

Default value: 'uninstall.php'
getInstallDictionariesDirectory
setInstallDictionariesDirectory
Sets the name of the subdirectory in which the dictionaries of the module will be stored. These dictionaries will be installed on the system when the module is installed.

Výchozí hodnota: 'dictionaries'
getViewsDir
setViewsDir
Sets the name of the directory where the view scripts of the module are located.

Default value: 'views'
getMenuItemsDir
setMenuItemsDir
Sets the name of the directory used to define menu items.

Default value: 'menu-items'
getModuleRootNamespace
setModuleRootNamespace
Sets the root namespace for all modules. Thus, the names of classes belonging to all modules will always start with this value.

Default value: 'JetApplicationModule'
getManifestFileName
setManifestFileName
Sets the name of the file containing the module manifest.

Default value: 'manifest.php'
getPagesDir
setPagesDir
Sets the name of the directory used for defining pages that are part of the module.

Default value: 'pages'
getInstalledModulesListFilePath
setInstalledModulesListFilePath
Sets the path to the file that contains the list of installed modules.

Default value is: ~/application/data/installed_modules_list.php'
getActivatedModulesListFilePath
setActivatedModulesListFilePath
Sets the path to the file that contains the list of activated modules.

Default value is: ~/application/data/activated_modules_list.php'

SysConf_Jet_Main

Getter / Setter Meaning of
getCharset
setCharset
Setting the default application character set. If you do not set otherwise, then the value is UTF-8
getTimezone
setTimezone
Option to set the default time zone
Previous chapter
SysConf_URI
Next chapter
Application configuration system