hasWildcards() || $this->hasPlaceholders()); } /** * Returns if there are placeholders in the path. * * @return boolean */ public function hasPlaceholders() { return ($this->getPlaceholders()->count() > 0); } /** * Returns every placeholder in the path, keyed by position. * * @return static */ public function getPlaceholders() { return $this->filter(function(PathComponent $component) { return $component->isPlaceholder(); }); } /** * Returns a copy of the collection with all placeholders removed. * * @return static */ public function deletePlaceholders() { return $this->filter(function(PathComponent $component) { return (! $component->isPlaceholder()); }); } }