Themosis::setRouter PHP Method

setRouter() public method

Setup the router API to be executed before theme default templates.
public setRouter ( )
        public function setRouter()
        {
            if (is_feed() || is_comment_feed()) {
                return;
            }
            try {
                $request = $this->container['request'];
                $response = $this->container['router']->dispatch($request);
                // We only send back the content because, headers are already defined
                // by WordPress internals.
                $response->sendContent();
            } catch (\Symfony\Component\HttpKernel\Exception\NotFoundHttpException $exception) {
                /*
                 * Fallback to WordPress templates.
                 */
            }
        }