/** * @param Request $request * @todo alter expression to handle page params * @todo this is duplicated from PageRequestTarget, needs refactoring * @return type */ private function getPageClassForPath(Request $request) { $mapEntry = PageMap::getPageMap(); foreach ($mapEntry as $path => $pageClass) { if (preg_match("/^" . $this->prepare($request->getRootPath()) . "\\/" . $path . "{1}([?|&]{1}\\S+={1}\\S+)*\$/", $request->getPath())) { return $pageClass::getIdentifier(); } } return false; }