protected function _library($path)
{
$result = null;
$match = '';
foreach (Libraries::get() as $name => $library) {
if (strpos($path, $library['path']) !== 0) {
continue;
}
if (strlen($library['path']) > strlen($match)) {
$result = $name;
$match = $library['path'];
}
}
return $result;
}