PHP Trait Dingo\Api\Routing\Helpers

Datei anzeigen Open project: dingo/api

Protected Properties

Property Type Description
$authenticationProviders array Controller authentication providers.
$rateLimit array Controller rate limit and expiration.
$scopes array Controller scopes.
$throttles array Controller rate limit throttles.

Public Methods

Method Description
__call ( string $method, array $parameters ) : Response Magically handle calls to certain methods on the response factory.
__get ( string $key ) : mixed Magically handle calls to certain properties.
api ( ) : Dispatcher Get the internal dispatcher instance.
getAuthenticationProviders ( ) : array Get the controllers authentication providers.
getRateLimit ( ) : array Get the controllers rate limit and expiration.
getScopes ( ) : array Get the controllers scopes.
getThrottles ( ) : array Get the controllers rate limiting throttles.

Protected Methods

Method Description
auth ( ) : Dingo\Api\Auth\Auth Get the auth instance.
authenticateWith ( string | array $providers, array $options = [] ) : void Authenticate with certain providers on controller methods.
getPropertyValue ( string | array $value ) : array Prepare a property value.
rateLimit ( integer $limit, integer $expires, array $options = [] ) : void Rate limit controller methods.
response ( ) : Factory Get the response factory instance.
scopes ( string | array $scopes, array $options = [] ) : void Add scopes to controller methods.
throttle ( string | Dingo\Api\Contract\Http\RateLimit\Throttle $class, array $options = [] ) : void Throttles for controller methods.
user ( ) : mixed Get the authenticated user.

Method Details

__call() public method

Magically handle calls to certain methods on the response factory.
public __call ( string $method, array $parameters ) : Response
$method string
$parameters array
return Dingo\Api\Http\Response

__get() public method

Magically handle calls to certain properties.
public __get ( string $key ) : mixed
$key string
return mixed

api() public method

Get the internal dispatcher instance.
public api ( ) : Dispatcher
return Dingo\Api\Dispatcher

auth() protected method

Get the auth instance.
protected auth ( ) : Dingo\Api\Auth\Auth
return Dingo\Api\Auth\Auth

authenticateWith() protected method

Authenticate with certain providers on controller methods.
protected authenticateWith ( string | array $providers, array $options = [] ) : void
$providers string | array
$options array
return void

getAuthenticationProviders() public method

Get the controllers authentication providers.
public getAuthenticationProviders ( ) : array
return array

getPropertyValue() protected method

Prepare a property value.
protected getPropertyValue ( string | array $value ) : array
$value string | array
return array

getRateLimit() public method

Get the controllers rate limit and expiration.
public getRateLimit ( ) : array
return array

getScopes() public method

Get the controllers scopes.
public getScopes ( ) : array
return array

getThrottles() public method

Get the controllers rate limiting throttles.
public getThrottles ( ) : array
return array

rateLimit() protected method

Rate limit controller methods.
protected rateLimit ( integer $limit, integer $expires, array $options = [] ) : void
$limit integer
$expires integer
$options array
return void

response() protected method

Get the response factory instance.
protected response ( ) : Factory
return Dingo\Api\Http\Response\Factory

scopes() protected method

Add scopes to controller methods.
protected scopes ( string | array $scopes, array $options = [] ) : void
$scopes string | array
$options array
return void

throttle() protected method

Throttles for controller methods.
protected throttle ( string | Dingo\Api\Contract\Http\RateLimit\Throttle $class, array $options = [] ) : void
$class string | Dingo\Api\Contract\Http\RateLimit\Throttle
$options array
return void

user() protected method

Get the authenticated user.
protected user ( ) : mixed
return mixed

Property Details

$authenticationProviders protected_oe property

Controller authentication providers.
protected array $authenticationProviders
return array

$rateLimit protected_oe property

Controller rate limit and expiration.
protected array $rateLimit
return array

$scopes protected_oe property

Controller scopes.
protected array $scopes
return array

$throttles protected_oe property

Controller rate limit throttles.
protected array $throttles
return array