PHP Class Adamgoose\Routing\Annotations\ResourceEndpoint

Inheritance: implements Adamgoose\Routing\Annotations\EndpointInterface, use trait EndpointTrait
Afficher le fichier Open project: adamgoose/laravel-annotations

Méthodes publiques

Свойство Type Description
$classMiddleware array The class level "inherited" middleware that apply to the resource.
$except array The methods that should not be included.
$middleware array This array is keyed by resource method name (index, create, etc).
$name string The name of the resource.
$names array The array of route names for the resource.
$only array The only methods that should be included.
$paths array[ResourcePath] This corresponds to a path for each applicable resource method.
$reflection ReflectionClass The ReflectionClass instance for the controller class.

Protected Properties

Свойство Type Description
$methods array All of the resource controller methods.

Méthodes publiques

Méthode Description
__construct ( array $attributes = [] ) : void Create a new route definition instance.
getPaths ( ) : array[AbstractPath] 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.

Méthodes protégées

Méthode Description
buildPaths ( ) : void Build all of the paths for the resource endpoint.
getClassMiddlewareForPath ( ResourcePath $path ) : array Get the class middleware for the given path.
getIncludedMethods ( ) : array Get the methods to be included in the resource.
getMiddleware ( ResourcePath $path ) : array Get all of the middleware for the given path.
getNames ( ResourcePath $path ) : array Get the names for the given path.
getTemplate ( ) : string Get the template for the endpoint.

Method Details

__construct() public méthode

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

buildPaths() protected méthode

Build all of the paths for the resource endpoint.
protected buildPaths ( ) : void
Résultat void

getClassMiddlewareForPath() protected méthode

Get the class middleware for the given path.
protected getClassMiddlewareForPath ( ResourcePath $path ) : array
$path ResourcePath
Résultat array

getIncludedMethods() protected méthode

Get the methods to be included in the resource.
protected getIncludedMethods ( ) : array
Résultat array

getMiddleware() protected méthode

This will also merge in any of the middleware applied at the route level.
protected getMiddleware ( ResourcePath $path ) : array
$path ResourcePath
Résultat array

getNames() protected méthode

Get the names for the given path.
protected getNames ( ResourcePath $path ) : array
$path ResourcePath
Résultat array

getPaths() public méthode

Get all of the path definitions for an endpoint.
public getPaths ( ) : array[AbstractPath]
Résultat array[AbstractPath]

getTemplate() protected méthode

Get the template for the endpoint.
protected getTemplate ( ) : string
Résultat string

hasPaths() public méthode

Determine if the endpoint has any paths.
public hasPaths ( ) : boolean
Résultat boolean

toRouteDefinition() public méthode

Transform the endpoint into a route definition.
public toRouteDefinition ( ) : string
Résultat string

Property Details

$classMiddleware public_oe property

The class level "inherited" middleware that apply to the resource.
public array $classMiddleware
Résultat array

$except public_oe property

The methods that should not be included.
public array $except
Résultat array

$methods protected_oe property

All of the resource controller methods.
protected array $methods
Résultat array

$middleware public_oe property

This array is keyed by resource method name (index, create, etc).
public array $middleware
Résultat array

$name public_oe property

The name of the resource.
public string $name
Résultat string

$names public_oe property

The array of route names for the resource.
public array $names
Résultat array

$only public_oe property

The only methods that should be included.
public array $only
Résultat array

$paths public_oe property

This corresponds to a path for each applicable resource method.
public array[ResourcePath] $paths
Résultat array[ResourcePath]

$reflection public_oe property

The ReflectionClass instance for the controller class.
public ReflectionClass $reflection
Résultat ReflectionClass