throw PageNotFoundException::
forControllerNotFound($this->controller,
$method);
} // Ensure the controller is not defined in routes.
$this->
protectDefinedRoutes();
// Ensure the controller does not have _remap() method.
$this->
checkRemap();
// Ensure the URI segments for the controller and method do not contain
// underscores when $translateURIDashes is true.
$this->
checkUnderscore($uri);
// Check parameter count
try { $this->
checkParameters($uri);
} catch (MethodNotFoundException
$e) { throw PageNotFoundException::
forControllerNotFound($this->controller,
$this->method
);
} $this->
setDirectory();
return [$this->directory,
$this->controller,
$this->method,
$this->params
];
}