https://github.com/guide42/choclo
Configuration Framework
https://github.com/guide42/choclo
Last synced: 3 months ago
JSON representation
Configuration Framework
- Host: GitHub
- URL: https://github.com/guide42/choclo
- Owner: guide42
- License: isc
- Archived: true
- Created: 2015-08-13T01:22:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-07-02T13:19:11.000Z (almost 7 years ago)
- Last Synced: 2026-01-14T13:56:56.595Z (3 months ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
Choclo
======

(by [Artful Magpie](https://www.flickr.com/photos/kmtucker/8135145941))
Choclo is a two-step configuration framework.
This is a PoC. DO NOT USE IT IN PRODUCTION.
Usage
-----
```php
use Guide42\Choclo\Configurator;
class MyApp extends Configurator
{
const PHASE_ROUTES = 60;
public function addRoute($name, $pattern, \Closure $controller)
{
$connect = function() use ($name, $pattern, $controller) {
$route = new Route($pattern, array(
'_controller' => $controller,
));
$routes = $this->getRegistry()->get('Symfony\Component\Routing\RouteCollection');
$routes->add($name, $route);
};
$this->register('route-' . $name, $connect, self::PHASE_ROUTES);
}
}
```
Badges
------
[](https://packagist.org/packages/guide42/choclo)
[](https://travis-ci.org/guide42/choclo)
[](https://coveralls.io/r/guide42/choclo)