Download the PHP package dobrosite/dobrosite-kernel without Composer
On this page you can find all versions of the php package dobrosite/dobrosite-kernel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dobrosite-kernel
Ядро (компонент Добро.сайт)
Ядро — узловая точка, связывающая вместе все используемые компоненты.
При разработке ядра сделан упор на следующие требования.
- Ядро должно быть легко встроить в имеющееся приложение (как правило в CMS).
Использование ядра из коробки
Для того, чтобы получить доступ к ядру, достаточно подключить загрузчик классов Composer:
Позволяет использовать:
- контейнер зависимостей;
- файлы настройки.
При этом ядро использует следующие значения:
- имя окружения (
Kernel::getEnvironment()
) —prod
; - режим отладки (
Kernel::isDebug()
) — отключен; - корневая папка (
Kernel::getRootDir()
) — папка, в которой лежит файлcomposer.lock
; - папка кэша (
Kernel::getCacheDir()
) —<системная папка для временных файлов>/<хэш sha1 от корневой папки>/cache/<имя окружения>
; - папка журналов (
Kernel::getLogDir()
) —<системная папка для временных файлов>/<хэш sha1 от корневой папки>/logs
; - файлы настройки:
config/services.yaml
;config/services_<имя окружения>.yaml
.
Собственная конфигурация ядра
Если значения по умолчанию, указанные выше, вам не подходят, вы можете переопределить их при помощи
класса Configuration. Для этого рекомендуется создать отдельный, например
с именем bootstrap.php
следующего вида:
Теперь вы можете подключить его ко всем нужным файлам вместо autoload.php
:
All versions of dobrosite-kernel with dependencies
symfony/config Version ^3.4|^4.0
symfony/dependency-injection Version ^3.4|^4.0
symfony/http-foundation Version ^3.4|^4.0
symfony/http-kernel Version ^3.4|^4.0