public function getEntryPoint($path)
{
$first = false === ($pos = strpos($path, '/')) ? $path : substr($path, 0, $pos);
if (null !== $this->entryPoints) {
foreach ($this->entryPoints as $entryPoint) {
if ($first == $entryPoint->getPath()) {
if (false !== strpos($path, '/')) {
return $entryPoint->getChild(substr($path, $pos + 1));
} else {
return $entryPoint;
}
}
}
}
}