Config
File
Example
<?php
return [
'debug' => true,
'cores' => [
'Site' => $_SERVER['DOCUMENT_ROOT'] . '/Site',
'BlackFox' => $_SERVER['DOCUMENT_ROOT'] . '/BlackFox',
],
'roots' => [
'/Site/root' => $_SERVER['DOCUMENT_ROOT'] . '/Site/root',
'/BlackFox/root' => $_SERVER['DOCUMENT_ROOT'] . '/BlackFox/root',
],
'languages' => [
'en' => 'English',
'ru' => 'Русский',
],
'templates' => [
'main' => '/Site/templates/main',
'admin' => '/BlackFox/templates/admin',
],
'overrides' => [
'BlackFox\Engine' => 'Site\Engine',
'BlackFox\Database' => 'BlackFox\MySQL',
],
'database' => [
'HOST' => 'localhost',
'PORT' => 3306,
'USER' => 'root',
'PASSWORD' => '',
'DATABASE' => 'site',
],
];
- /Site -- directory with your core
- /BlackFox -- directory with framework (which is also the core)
Keys meaning
- debug
- bool, set this to true to allow global function debug() to work
- cores
-
dictionary of cores:
- key - namespace of the core
- value - absolute path to core folder
first key has top priority - roots
-
dictionary of roots:
- key - relative path to root
- value - absolute path to root
first key has top priority - languages
-
dictionary of languages (may be empty):
- key - symbolic code of language
- value - name of language
first element is the default language - templates
-
dictionary of templates:
- key - template code
- value - relative path to the template folder
- overrides
-
dictionary, describing classes overriding:
- key - class that needs to be overridden
- value - class to override with
remember that you can successfully override class only with it's children - database
- dictionary of details for connecting to the database, vary by driver