public function __get($name) { if (!property_exists($this, $name)) { throw new OutOfRangeException('Only the path and handler may be accessed from a Route instance'); } return $this->{$name}; }