protected static function _locateDeferred($defer, $paths, $params, array $options = array())
{
$libraries = static::$_configurations;
if (isset($options['library'])) {
$libraries = static::get((array) $options['library']);
}
foreach ($libraries as $library => $config) {
if ($config['defer'] !== $defer && $defer !== null) {
continue;
}
foreach (static::_searchPaths($paths, $library) as $tpl) {
$params['library'] = rtrim($config['prefix'], '\\');
$class = str_replace('\\*', '', String::insert($tpl, $params));
if (file_exists($file = Libraries::path($class, $options))) {
return $options['type'] === 'file' ? $file : $class;
}
}
}
}