foreach ($reflection->
getMethods(ReflectionMethod::IS_PUBLIC
) as $method) { $methodName =
$method->
getName();
foreach ($this->httpMethods
as $httpVerb) { if (strpos($methodName,
$httpVerb) === 0
) { // Remove HTTP verb prefix.
$methodInUri =
lcfirst(substr($methodName,
strlen($httpVerb)));
// Check if it is the default method.
if ($methodInUri ===
$defaultMethod) { $routeForDefaultController =
$this->
getRouteForDefaultController( $classShortname,
$defaultController,
$classInUri,
$classname,
$methodName,
$httpVerb,
$method );
if ($routeForDefaultController !==
[]) { // The controller is the default controller. It only