Dotkernel Frontend follows the PSR-4 standards.
It is considered 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)log
- 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 are 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
directory for modulesThis 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