Extends
lithium\console\Command
Finds a library for given path.
Parameters
- string $path Normalized (to slashes) absolute or relative path.
Returns
string Returns the library's path on success, or `null` on failure.Source
protected function _library($path) {
foreach (Libraries::get() as $name => $library) {
if (strpos($path, $library['path']) !== 0) {
continue;
}
$path = str_replace(array($library['path'], '.php'), null, $path);
return '\\' . $name . str_replace('/', '\\', $path);
}
}