$reflection =
new ReflectionClass($class);
if ($reflection->
isAbstract()) { return [];
} $classname =
$reflection->
getName();
$classShortname =
$reflection->
getShortName();
$output =
[];
$classInUri =
$this->
getUriByClass($classname);
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) {