Dotkernel Frontend follows the PSR-4 standards.
It is a good practice to standardize the file structure of projects.
When using DotKernel Frontend the following structure is installed by default:
bin
- Executable files from CLIconfig
- Various configuration filesdata
- Should contain project-related data (AVOID storing sensitive data on VCS)documentation
- Should contain project-related documentationlog
- Storage of log files generated by dot-error-log librarypublic
- Publicly visible files. The webserver need to have this folder as www-document root folder.src
- Should contain the source code filestest
- Should contain the test files.github
- Contains workflow files.laminas-ci
- Contains laminas-ci workflow filessrc
directoryThis directory contains all source code related to the Module. It should contain the following directories, if they’re not empty:
The above example lists just a part of the directories in a project, but it should give you an idea of what the structure should look like.
Other classes in the src
directory may include InputFilter
, EventListener
, Helper
, Command
, Factory
etc.
The src
directory should also contain 2 files:
ConfigProvider.php
- Provides configuration dataRoutesDelegator.php
- Module main routes entry filetemplates
directoryThis directory contains the template files, used for example to help render e-mail templates.
DotKernel Frontend uses
twig
as Templating Engine. All template files have the extension.html.twig
.
data
directoryThis directory contains project-related data, like cache and file uploads.
We recommend using the following directory structure:
data/cache
- Location where caches are storeddata/doctrine
- Fixtures and migrationsdata/lock
- Lock files generated by dotkernel/dot-cli