Skip to content

Commit 5607895

Browse files
authored
Merge pull request #77 from dotkernel/versions
udpated file structure page
2 parents 38d2c89 + 827f6ab commit 5607895

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

docs/book/v5/introduction/file-structure.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,58 +10,58 @@ When using Dotkernel API the following structure is installed by default:
1010

1111
## Special purpose folders
1212

13-
* `.github` - contains GitHub workflow files
14-
* `.laminas-ci` - contains laminas-ci workflow files
13+
* `.github` - Contains GitHub workflow files
14+
* `.laminas-ci` - Contains laminas-ci workflow files
1515

1616
## `bin` folder
1717

1818
This folder contents are
1919

20-
* `clear-config-cache.php` - removes the config cache file (`data/cache/config-cache.php` - available only when development mode is enabled).
21-
* `cli.php` used to build console applications based on [laminas-cli](https://github.com/laminas/laminas-cli)
22-
* `doctrine` - used by the doctrine fixtures to populate the database tables
20+
* `clear-config-cache.php` - Removes the config cache file `data/cache/config-cache.php`; available only when development mode is enabled
21+
* `cli.php` - Used to build console applications based on [laminas-cli](https://github.com/laminas/laminas-cli)
22+
* `doctrine` - Used by the doctrine fixtures to populate the database tables
2323

2424
## `config` folder
2525

2626
This folder contains all application-related config files:
2727

28-
* `cli-config.php`: command line interface configuration used by migrations, fixtures, crons
29-
* `config.php`: registers ConfigProviders for installing packages
30-
* `container.php`: main service container that provides access to all registered services
31-
* `development.config.php.dist`: activates debug mode; gets symlinked as `development.config.php` when enabling development mode
32-
* `migrations.php`: configuration for database migration, like migration file location and table to save the migration log
33-
* `pipeline.php`: contains a list of middlewares, in the order of their execution
34-
* `twig-cs-fixer.php`: configuration file for Twig code style checker/fixer
28+
* `cli-config.php` - Command line interface configuration used by migrations, fixtures, crons
29+
* `config.php` - Registers ConfigProviders for installing packages
30+
* `container.php` - Main service container that provides access to all registered services
31+
* `development.config.php.dist` - Activates debug mode; gets symlinked as `development.config.php` when enabling development mode
32+
* `migrations.php` - Configuration for database migration, like migration file location and table to save the migration log
33+
* `pipeline.php` - Contains a list of middlewares, in the order of their execution
34+
* `twig-cs-fixer.php` - Configuration file for Twig code style checker/fixer
3535

3636
### `config/autoload` folder
3737

3838
This folder contains all service-related local and global config files:
3939

40-
* `authorization.global.php`: configures access per route for user roles
41-
* `cli.global.php`: configures cli
42-
* `content-negotiation.global.php`: configures request and response formats
43-
* `cors.local.php.dist`: configures Cross-Origin Resource Sharing, like call origin, headers, cookies
44-
* `dependencies.global.php`: config file to set global dependencies that should be accessible by all modules
45-
* `development.local.php.dist`: gets symlinked as `development.local.php` when enabling development mode - activates error handlers
46-
* `doctrine.global.php`: configuration used by Object–relational mapping
47-
* `error-handling.global.php`: configures and activates error logs
48-
* `local.php.dist`: local config file where you can overwrite application name and URL
49-
* `local.test.php.dist`: local configuration for functional tests
50-
* `mail.local.php.dist`: mail configuration; e.g. sendmail vs smtp, message configuration, mail logging
51-
* `mezzio.global.php`: Mezzio core config file
52-
* `mezzio-tooling-factories.global.php`: add or remove factory definitions
53-
* `response-header.global.php`: defines headers per route
54-
* `templates.global.php`: dotkernel/dot-twigrenderer config file
40+
* `authorization.global.php` - Configures access per route for user roles
41+
* `cli.global.php` - Configures cli
42+
* `content-negotiation.global.php` - Configures request and response formats
43+
* `cors.local.php.dist` - Configures Cross-Origin Resource Sharing, like call origin, headers, cookies
44+
* `dependencies.global.php` - Sets global dependencies that should be accessible by all modules
45+
* `development.local.php.dist` - Gets symlinked as `development.local.php` when enabling development mode; activates error handlers
46+
* `doctrine.global.php` - Configuration used by Object–relational mapping
47+
* `error-handling.global.php` - Configures and activates error logs
48+
* `local.php.dist` - Local configuration file where you can overwrite application name and URL
49+
* `local.test.php.dist` - Local configuration for functional tests
50+
* `mail.local.php.dist` - Mail configuration; e.g. sendmail vs smtp, message configuration, mail logging
51+
* `mezzio.global.php` - Mezzio core config file
52+
* `mezzio-tooling-factories.global.php` Add or remove factory definitions
53+
* `response-header.global.php` - Defines headers per route
54+
* `templates.global.php` - dotkernel/dot-twigrenderer config file
5555

5656
## `data` folder
5757

5858
This folder is a storage for project data files and service caches.
5959
It contains these folders:
6060

61-
* `cache`: cache for e.g. Twig files
62-
* `doctrine`: database migrations and fixtures
63-
* `oauth`: encryption, private and public keys needed for authentication
64-
* `data/lock` - lock files generated by [`dotkernel/dot-cli`](https://docs.dotkernel.org/dot-cli/v3/lock-files/)
61+
* `cache` - Cache for e.g. Twig files
62+
* `doctrine` - Database migrations and fixtures
63+
* `oauth` - Encryption, private and public keys needed for authentication
64+
* `lock` - Contains lock files generated by [`dotkernel/dot-cli`](https://docs.dotkernel.org/dot-cli/v3/lock-files/)
6565

6666
> AVOID storing sensitive data on the repository!
6767
@@ -74,20 +74,20 @@ When you access the application from the browser, (if not already created) a new
7474

7575
This folder contains all publicly available assets and serves as the entry point of the application:
7676

77-
* `uploads`: a folder that normally contains files uploaded via the application
78-
* `.htaccess`: server configuration file used by Apache web server; it enables the URL rewrite functionality
79-
* `index.php`: the application's main entry point
80-
* `robots.txt.dist`: a sample robots.txt file that allows/denies bot access to certain areas of your application; activate it by duplicating the file as `robots.txt` and comment out the lines that don't match your environment
77+
* `uploads` - Normally contains files uploaded via the application
78+
* `.htaccess` - Server configuration file used by Apache web server; it enables the URL rewrite functionality
79+
* `index.php` - The application's main entry point
80+
* `robots.txt.dist` - A sample robots.txt file that allows/denies bot access to certain areas of your application; activate it by duplicating the file as `robots.txt` and comment out the lines that don't match your environment
8181

8282
## `src` folder
8383

8484
This folder contains a separate folder for each Module.
8585

8686
These are the modules included by default:
8787

88-
* `Admin` - contains functionality for managing users with `admin` role; note these are users save in the `admin` database table
89-
* `App` - contains core functionality, from authentication, to rendering, to error reporting
90-
* `User` - contains functionality for managing regular users
88+
* `Admin` - Contains functionality for managing users with `admin` role; note these are users save in the `admin` database table
89+
* `App` - Contains core functionality, from authentication, to rendering, to error reporting
90+
* `User` - Contains functionality for managing regular users
9191

9292
### Module contents
9393

@@ -96,7 +96,6 @@ Each Module folder, in turn, should contain the following folders, unless they a
9696
* `src/Handler` - Action classes (similar to Controllers but can only perform one action)
9797
* `src/Entity` - Used by database entities
9898
* `src/Service` - Service classes
99-
* `src/Collection` - Database entities collections
10099
* `src/Repository` - Entity repository folder
101100

102101
The above example is just some of the folders a project may include, but they should give you an idea about the recommended structure.
@@ -112,4 +111,5 @@ The `src` folder in each Module folder normally also contains these files:
112111

113112
This folder contains the template files, used for example to help render e-mail templates.
114113

115-
> Dotkernel API uses twig as Templating Engine. All template files have the extension `.html.twig`
114+
> `twig` is used as Templating Engine.
115+
> All template files have the extension `.html.twig`

0 commit comments

Comments
 (0)