Ouzo\Controller::initialize PHP Method

initialize() public method

public initialize ( RouteRule $routeRule )
$routeRule Ouzo\Routing\RouteRule
    public function initialize(RouteRule $routeRule)
    {
        $this->_routeRule = $routeRule;
        $uri = new Uri();
        $this->currentController = $routeRule->getController();
        $this->currentAction = $routeRule->isActionRequired() ? $routeRule->getAction() : $uri->getAction();
        $viewName = $this->getViewName();
        $this->view = new View($viewName);
        $this->layout = new Layout($this->view);
        $this->params = $this->createParameters($routeRule, $uri);
    }