src/Charcoal/App/Route/RouteManager.php
public function setupRoutes()
    {
        $routes = $this->config();

        if (PHP_SAPI == 'cli') {
            $scripts = ( isset($routes['scripts']) ? $routes['scripts'] : [] );
            foreach ($scripts as $scriptIdent => $scriptConfig) {
                $this->setupScript($scriptIdent, $scriptConfig);
            }
        } else {
            $templates = ( isset($routes['templates']) ? $routes['templates'] : [] );
            foreach ($templates as $routeIdent => $templateConfig) {
                $this->setupTemplate($routeIdent, $templateConfig);
            }

            $actions = ( isset($routes['actions']) ? $routes['actions'] : [] );
            foreach ($actions as $actionIdent => $actionConfig) {
                $this->setupAction($actionIdent, $actionConfig);
            }
        }
    }
public function setupRoutes()
    {
        $routes = $this->config();

        if (PHP_SAPI == 'cli') {
            $scripts = ( isset($routes['scripts']) ? $routes['scripts'] : [] );
            foreach ($scripts as $scriptIdent => $scriptConfig) {
                $this->setupScript($scriptIdent, $scriptConfig);
            }
        } else {
            $templates = ( isset($routes['templates']) ? $routes['templates'] : [] );
            foreach ($templates as $routeIdent => $templateConfig) {
                $this->setupTemplate($routeIdent, $templateConfig);
            }

            $actions = ( isset($routes['actions']) ? $routes['actions'] : [] );
            foreach ($actions as $actionIdent => $actionConfig) {
                $this->setupAction($actionIdent, $actionConfig);
            }
        }
    }
public function setupRoutes ( ) { $ routes = $ this -> config ( ) ; if ( PHP_SAPI == 'cli' ) { $ scripts = ( isset ( $ routes [ 'scripts' ] ) ? $ routes [ 'scripts' ] : [ ] ) ; foreach ( $ scripts as $ scriptIdent => $ scriptConfig ) { $ this -> setupScript ( $ scriptIdent , $ scriptConfig ) ; } } else { $ templates = ( isset ( $ routes [ 'templates' ] ) ? $ routes [ 'templates' ] : [ ] ) ; foreach ( $ templates as $ routeIdent => $ templateConfig ) { $ this -> setupTemplate ( $ routeIdent , $ templateConfig ) ; } $ actions = ( isset ( $ routes [ 'actions' ] ) ? $ routes [ 'actions' ] : [ ] ) ; foreach ( $ actions as $ actionIdent => $ actionConfig ) { $ this -> setupAction ( $ actionIdent , $ actionConfig ) ; } } }
Set up the routes.

There are 3 types of routes:

- Templates
- Actions
- Scripts

@return void
Set up the routes .