protected function registerRoutes()
{
$reader = new AnnotationReader();
$class = new \ReflectionClass($this);
/** @var RouteCollection $router */
$router = $this->getContainer()->get(Application::CONTAINER_ID_ROUTER);
/** @var \ReflectionMethod $method */
foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
$this->registerRoute($router, $class, $method, $reader->getMethodAnnotation($method, '\\Phprest\\Annotation\\Route'));
}
}