protected static function _initScopes()
{
static::$_scopes = static::_instance('configuration');
$self = get_called_class();
static::$_scopes->initConfig = function ($name, $config) use($self) {
$defaults = array('absolute' => false, 'host' => null, 'scheme' => null, 'base' => null, 'prefix' => '', 'pattern' => '', 'values' => array(), 'library' => $name);
$config += $defaults;
if (!$config['pattern']) {
$config = $self::invokeMethod('_compileScope', array($config));
}
$config['base'] = $config['base'] ? trim($config['base'], '/') : $config['base'];
return $config;
};
}