Adamgoose\Routing\Annotations\EndpointCollection::getAllPaths PHP Method

getAllPaths() public method

Get all of the paths for the given endpoint collection.
public getAllPaths ( ) : array
return array
    public function getAllPaths()
    {
        $paths = [];
        foreach ($this as $endpoint) {
            foreach ($endpoint->getPaths() as $path) {
                $paths[] = $path;
            }
        }
        return $paths;
    }

Usage Example

 /**
  * Set the domain on the endpoints.
  *
  * @param  EndpointCollection  $endpoints
  * @return void
  */
 protected function setEndpointDomains(EndpointCollection $endpoints)
 {
     foreach ($endpoints->getAllPaths() as $path) {
         if (is_null($path->domain)) {
             $path->domain = $this->domain;
         }
     }
 }
All Usage Examples Of Adamgoose\Routing\Annotations\EndpointCollection::getAllPaths
EndpointCollection