src/Page/Page.php
public function route(string $action, $callback, string $method = 'get', string $title = ''): PageInterface
    {
        $method = strtolower($method);
        $action = $this->parseAction($action, $method);

        $this->routes[$method][$action] = $callback;

        $this->titles[$action] = ! empty($title) ? $title : $this->getTitle();

        $this->registerRouteActions();

        return $this;
    }
public function route(string $action, $callback, string $method = 'get', string $title = ''): PageInterface
    {
        $method = strtolower($method);
        $action = $this->parseAction($action, $method);

        $this->routes[$method][$action] = $callback;

        $this->titles[$action] = ! empty($title) ? $title : $this->getTitle();

        $this->registerRouteActions();

        return $this;
    }
public function route ( string $ action , $ callback , string $ method = 'get' , string $ title = '' ) : PageInterface { $ method = strtolower ( $ method ) ; $ action = $ this -> parseAction ( $ action , $ method ) ; $ this -> routes [ $ method ] [ $ action ] = $ callback ; $ this -> titles [ $ action ] = ! empty ( $ title ) ? $ title : $ this -> getTitle ( ) ; $ this -> registerRouteActions ( ) ; return $ this ; }
Register page routes.

@param string          $action
@param callable|string $callback
@param string          $method
@param string          $title

@return PageInterface
Register page routes .