-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Gimanh edited this page Jul 30, 2019
·
5 revisions
Configuration for ZXC_PHP
is a php file which returns simple associative array with next structure
return [
'ZXC' => [
'Modules' => [
'Session' => [
'class' => '\ZXC\Native\HTTP\Session',
'options' => [
'prefix' => 'zxc',
'time' => 6200,
'path' => '/',
'domain' => 'zxc.com'
]
]
],
'Autoload' => [
'../../server' => true,
],
'Router' => [
'methods' => ['POST' => true, 'GET' => true, 'OPTIONS' => true],
'routes' => [
[
'route' => 'POST|/|Class:method'
]
],
]
]
];
ZXC
- this section can have next keys with config (Router
, Autoload
, Modules
).
ZXC/Modules
- this section contains module settings, where key is module name (see above Session
).
Every config for module is associative array which must have 2 keys class
and options
.
class
- lets know which class will be called for initialise.
options
- lets know which options will be used for module instance.
Every module config must be located in ZXC/Module
section.
Footer