/** * Sets the passed options on the endpoint. * * Only sets endpoints matching setters in the Endpoint class. * * @param Endpoint $endpoint * @param array $options * * @return Endpoint * @throws MalformedRouteException */ protected function setOptions(Endpoint $endpoint, array $options) { if (isset($options['guard'])) { $endpoint->setGuard($options['guard']); } if (isset($options['filter'])) { $endpoint->setFilter($options['filter']); } if (isset($options['prefix'])) { $endpoint->setPrefix($options['prefix']); } return $endpoint; }