nigelgreenway / colonel
A component based framework on StackPHP with PHP League components
v0.4.1
2016-06-03 14:56 UTC
Requires
- php: >=5.5.0
- league/container: ^1.3.2
- league/route: ^1.1.0
- symfony/http-kernel: ^2.6
Requires (Dev)
- filp/whoops: ^1.1
- phpunit/phpunit: ^4.6.6
- twig/twig: ^1.18.1
This package is auto-updated.
Last update: 2024-11-27 16:33:45 UTC
README
To use, simply add:
<?php require __DIR__ . '/../vendor/autoload.php'; $app = (new Colonel\HttpKernel( require_once __DIR__ . '/../Application/Configuration.php' ))->run();
An example configuration file:
<?php return [ 'debug' => false, 'routes' => [ 'DemoBundle' => [ 'hello_world' => [ 'pattern' => '/your/pattern/{var}', 'controller' => 'Path\\To\\Class::method', 'method' => 'GET', ], ], ], 'services' => [ 'di' => [ 'Path\\To\\Some\\Dependency' => [ 'class' => 'Path\\To\\Some\\Dependency', 'arguments' => [ 'Path\\To\\Some\\Other\\Dependency', ], ], 'Path\\To\\Some\\Other\\Dependency' => [ 'class' => 'Path\\To\\Some\\Other\\Dependency', ], ], ], ];
This will be fleshed more out soon...