lithium\net\http\Router::_initScopes()
Initialize static::$_scopes
with a lithium\core\Configuration
instance.
Source
protected static function _initScopes() {
static::$_scopes = static::_instance('configuration');
static::$_scopes->initConfig = function($name, $config) {
$defaults = [
'absolute' => false,
'host' => null,
'scheme' => null,
'base' => null,
'prefix' => '',
'pattern' => '',
'values' => [],
'library' => $name
];
$config += $defaults;
if (!$config['pattern']) {
$config = static::_compileScope($config);
}
$config['base'] = $config['base'] ? trim($config['base'], '/') : $config['base'];
return $config;
};
}