public function __get($property) { switch ($property) { case 'routes': return $this->routes; default: return parent::__get($property); } }