tests build demo application
-
We are do Create structural file system
- Public folder
- index.php
- assets/ folder for resources Pictures, Styles and Script for site semantic
- Folder organization of the core
- App - my application folder
- Jungle - git submodule Jungle.git
- Public folder
-
We are use
$ cd core && git submodule add https://github.com/Lexus27/Jungle.git Jungle
-
We inherit the base
Jungle\Application
classes for mca-organizing system- Place model classes definition in
App\Model
- Place our modules in
App\Modules
- Place controller classes by pattern
App\Modules\{ModuleName}\Controller\{ControllerName}Controller
- We define our logic for basic services in method
App\Application::registerServices(DiInterface $di)
must have services:
event_manager
andcrash_reporter
- In method
App\Application::initializeView
we are do initializeView
instance - In method
App\Application::initializeViewRenderers
need have set aliased Renderers
- Place model classes definition in
-
MCA-Module define intercepted exception behaviour for
Process::getTask('access')
and forward to ourdenied
mca-action reference -
First of all before 'Hello World', we must create a system of mca - is
Module
,Controller
andAction
to reference#index:index:index
as default in our applicationThe same applies to our html templates in the
App/Views/html
folder -
Define services to our
App\Strategies\Http
(RequestStrategy
)RequestStrategy separates the logic of interaction with the data request from the application logic
- Service
router
general service for routing in application on concreteStrategy
- Important use
Router::notFound
for specify not_found reference and params(If none of the specified paths does not match) - Important set main reference
#index:index:index
(in our app) route for successfully work it by default
- Important use
- Service
view_strategy
for recognizing semantic to targetrenderer
for currentRequest
- Service
session
need instance SessionManager - Service
cookie
need instance CookieManager - Service
account
need instance \Jungle\User\Account, for work with users
- Service
Folder
App/Services
must contains custom extended services and our classes uses in application work