Modular Extensions makes the Slim 3 micro framework modular. Modules are groups of independent components, typically model, controller and view, arranged in an application modules sub-directory that can be dropped into other Slim 3 applications.
HMVC stands for Hierarchical Model View Controller.
Module Controllers can be used as normal Controllers or HMVC Controllers and they can be used as widgets to help you build view partials.
Hierarchical model–view–controller (HMVC) is a software architectural pattern, a variation of model–view–controller (MVC) similar to presentation–abstraction–control (PAC), that was published in 2000 in an article in JavaWorld Magazine, the authors apparently unaware of PAC, which was published 13 years earlier.
The controller has some oversight in that it selects first the model and then the view, realizing an approval mechanism by the controller. The model prevents the view from accessing the data source directly.
PAC
and HMVC
See: Hierarchical Model View Controller from Wikipedia
Run this command from the directory in which you want to install your new Slim Framework application.
composer create-project nguyenanhung/slim-3-hmvc-skeleton [my-app-name]
or
php composer.phar create-project nguyenanhung/slim-3-hmvc-skeleton [my-app-name]
Replace [my-app-name]
with the desired directory name for your new application. You'll want to:
- Point your virtual host document root to your new application's
public/
directory. - Ensure
storage/
is web writeable.
To run the application in development, you can run these commands
cd [my-app-name]
php composer.phar start
Run this command in the application directory to run the test suite
php composer.phar test
or
./vendor/bin/phpunit
That's it! Now go build something cool.
Project slim-3-hmvc-skeleton use symfony/console is handle Console request
Example
composer worker app:test-command
or
php cli.php app:test-command
@see: Symfony Console
See full Structure: TREE.md
If any quetion & request, please contact following infomation
Name | Skype | ||
---|---|---|---|
Hung Nguyen | [email protected] | nguyenanhung5891 | @nguyenanhung |
From Hanoi with Love <3