PHP Class Adamgoose\Routing\Annotations\MethodEndpoint

Inheritance: implements Adamgoose\Routing\Annotations\EndpointInterface, use trait EndpointTrait
Mostra file Open project: adamgoose/laravel-annotations Class Usage Examples

Public Properties

Property Type Description
$classMiddleware array All of the class level "inherited" middleware defined for the pathless endpoint.
$method string The method that handles the route.
$middleware array All of the middleware defined for the pathless endpoint.
$paths array[Path] The route paths for the definition.
$reflection ReflectionClass The ReflectionClass instance for the controller class.
$uses string The controller and method that handles the route.

Public Methods

Method Description
__construct ( array $attributes = [] ) : void Create a new route definition instance.
getPaths ( ) : array Get all of the path definitions for an endpoint.
hasPaths ( ) : boolean Determine if the endpoint has any paths.
toRouteDefinition ( ) : string Transform the endpoint into a route definition.

Protected Methods

Method Description
getClassMiddlewareForPath ( AbstractPath $path ) : array Get the class middleware for the given path.
getMiddleware ( AbstractPath $path ) : array Get the middleware for the path.
getTemplate ( ) : string Get the template for the endpoint.

Method Details

__construct() public method

Create a new route definition instance.
public __construct ( array $attributes = [] ) : void
$attributes array
return void

getClassMiddlewareForPath() protected method

Get the class middleware for the given path.
protected getClassMiddlewareForPath ( AbstractPath $path ) : array
$path AbstractPath
return array

getMiddleware() protected method

Get the middleware for the path.
protected getMiddleware ( AbstractPath $path ) : array
$path AbstractPath
return array

getPaths() public method

Get all of the path definitions for an endpoint.
public getPaths ( ) : array
return array

getTemplate() protected method

Get the template for the endpoint.
protected getTemplate ( ) : string
return string

hasPaths() public method

Determine if the endpoint has any paths.
public hasPaths ( ) : boolean
return boolean

toRouteDefinition() public method

Transform the endpoint into a route definition.
public toRouteDefinition ( ) : string
return string

Property Details

$classMiddleware public_oe property

All of the class level "inherited" middleware defined for the pathless endpoint.
public array $classMiddleware
return array

$method public_oe property

The method that handles the route.
public string $method
return string

$middleware public_oe property

All of the middleware defined for the pathless endpoint.
public array $middleware
return array

$paths public_oe property

The route paths for the definition.
public array[Path] $paths
return array[Path]

$reflection public_oe property

The ReflectionClass instance for the controller class.
public ReflectionClass $reflection
return ReflectionClass

$uses public_oe property

The controller and method that handles the route.
public string $uses
return string