The HTTP kernel is used to handle requests to the web server.
The HTTP kernel is created in the
index.php file. Usually you do not have to make any adjustments there. The following are just background information.
The following example illustrates how the
ApcuCachedIniFileBiosAdapter adapter is passed to the HTTP kernel:
'config', __HOST__, __BIOS__, 'bios.ini'
$kernel = new \Ucms\Kernel\HttpKernel(
$exit_code = $kernel->handleRequest();
ApcuCachedIniFileBiosAdapter adapter is the recommended adapter. It is also recommended to create several configurations, for example one for the admin panel, and one for the actual application.
In the standard configuration, the
UCMS_BIOS environment variable is defined in the
.htaccess file, depending on whether the hostname of the subdomain has the name
acp or not:
SetEnvIf Host "^(?=acp\.)" UCMS_BIOS=acp
SetEnvIf Host "^(?!acp\.)" UCMS_BIOS=ucp
In addition, the environment variable
UCMS_HOST is defined:
SetEnvIf Host "example\.domain$" UCMS_HOST=example.domain
SetEnvIf Host "another\.domain$" UCMS_HOST=another.domain
The content of these variables then defines the constants
__BIOS__ has either the value
ucp and stands for
__HOST__ contains the domain name.
These constants are used to build the filepath of the config file.
If the domain
acp.example.domain is requested, the config file
resources/config/example.domain/acp/bios.ini will be used. This is the
If any other subdomain is requested, for example the
www.example.domain subdomain, the
resources/config/example.domain/ucp/bios.ini config file will be used. This is the
example.domain (the actual application).
Each bios represents an area and each area can consist of one or more domains. Due to the environment variables in the .htaccess file, the domains can also be mapped. For example, if another domain is requested, another bios would be loaded unless you modify the mapping.
In this way, large applications can be subdivided as needed. For example, if you have a support section and want to separate it, just create another bios that will be loaded whenever the support domain is requested. If you want to manage multiple domains in an application, simply customize the mapping using the environment variables.