Application: Workflow (WIP)
Notes
Controller/Contract/general interfaceController/Service/general abstract controller, specific controllerresources/templates/vanilla/main/main templateView/main, specificFactory/View/Containerresources/templates/vanilla/specific-
config -
RequestHandler/Dynamic/ -
src/Project/Factory/Http/RequestHandlerFactory.php -
src/Project/Factory/Middleware/ResourceMiddlewareFactory.php -
src/Project/Instantiator/Controllercreate instantiator src/Project/Instantiator/Controller/SpecificModuleControllerInstantiator.phpadd line in array
Basic application structure
- (TODO)
-
bin(if usingCommand); -
public .htaccessindex.phpresources/templates;-
src/Project; -
config;
Create a new module (Command)
- create command:
src/Project/Command/ - create command factory:
src/Project/Factory/Command/ - create command runner:
bin/
Create a new module (Web)
- create:
src/Project/Instantiator/Controller/ - (if special dependencies): create:
src/Project/Factory/Container/ - (TODO: add other steps)
Add a new page in an existing section.
- (TODO: check)
- define what you want to display: create view (implements ViewInterface)
- create template: display view
- (if working with storage): add interface method(s)
- (if working with storage): add storage method(s)
- create controller
- add route (config dir)
Form workflow
- (TODO: check)
- (if need custom method(s)) create from factory interface (extends FormFactoryInterface)
- create form factory (FormFactoryInterface)
- add/update FormFactoryContainerInterface
- add/update FormFactoryContainer
- controller: createAndHandleForm
- view: add form
API workflow
Authentication
src/Project/Middleware/ApiAuthenticationMiddleware.phpsrc/Project/Factory/Http/AbstractRequestHandlerFactory.php.createApiAuthenticationMiddlewaresrc/Project/Factory/Http/RequestHandlerFactory.php.createRequestHandler.addMiddleware
Configuration
config/
Container
src/Project/Contract/Container/API/src/Project/Container/API/src/Project/Factory/Container/APILocalDependencyContainerFactory.phpsrc/Project/Instantiator/Controller/APIModuleControllerInstantiator.php
Data Transfer Objects
src/Project/DataTransfer/API/
Views
src/Project/View/API/
Templates
resources/templates/vanilla/main/main.api.default.phpresources/templates/vanilla/api/default.php
Controller
src/Project/Controller/API/AbstractAPIController.phpsrc/Project/Controller/API/APIController.php
Routes configuration
config/API/Routes.php
Middleware
src/Project/RequestHandler/Dynamic/ApiRequestHandler.phpsrc/Project/Factory/Middleware/ResourceMiddlewareFactory.phpcreateApiRequestHandlergetResouceMiddlewareHandlers