/** * @param Router $router * * @return $this */ public function setRouter(Router $router) { $this->router = $router; $this->router->setApplication($this); return $this; }