Skip to content
This repository has been archived by the owner on Jun 27, 2021. It is now read-only.

guide42/choclo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Choclo

by  Artful Magpie (by Artful Magpie)

Choclo is a two-step configuration framework.

This is a PoC. DO NOT USE IT IN PRODUCTION.

Usage

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

Latest Stable Version Build Status Coverage Status

About

Configuration Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages