public function getRoutes($version = null) { if (!is_null($version)) { return $this->routes[$version]; } return $this->routes; }