PHP Class Dingo\Blueprint\Resource

Inheritance: extends Section
ファイルを表示 Open project: dingo/blueprint Class Usage Examples

Protected Properties

Property Type Description
$actions Illuminate\Support\Collection Collection of actions belonging to a resource.
$annotations Illuminate\Support\Collection Collection of annotations belonging to a resource.
$identifier string Resource identifier.
$reflector ReflectionClass Resource reflection instance.
$requestHeaders array Collection of default request headers belonging to a resource.
$responseHeaders array Collection of default response headers belonging to a resource.

Public Methods

Method Description
__construct ( string $identifier, ReflectionClass $reflector, Collection $annotations, Collection $actions ) : void Create a new resource instance.
getActions ( ) : Collection Get the actions belonging to the resource.
getDefinition ( ) : string Get the resource definition.
getDescription ( ) : string | null Get the resource description.
getIdentifier ( ) : string Get the resource identifier.
getMethod ( ) : string | null Get the resource method.
getRequestHeaders ( ) : array Get the resource default request headers.
getResponseHeaders ( ) : array Get the resource default response headers.
getUri ( ) : string get the resource URI.
hasRequestHeaders ( ) : boolean Check if resource has default request headers set.
hasResponseHeaders ( ) : boolean Check if resource has default response headers set.

Protected Methods

Method Description
setResourceOnActions ( ) : void Set the resource on each of the actions.

Method Details

__construct() public method

Create a new resource instance.
public __construct ( string $identifier, ReflectionClass $reflector, Collection $annotations, Collection $actions ) : void
$identifier string
$reflector ReflectionClass
$annotations Illuminate\Support\Collection
$actions Illuminate\Support\Collection
return void

getActions() public method

Get the actions belonging to the resource.
public getActions ( ) : Collection
return Illuminate\Support\Collection

getDefinition() public method

Get the resource definition.
public getDefinition ( ) : string
return string

getDescription() public method

Get the resource description.
public getDescription ( ) : string | null
return string | null

getIdentifier() public method

Get the resource identifier.
public getIdentifier ( ) : string
return string

getMethod() public method

Get the resource method.
public getMethod ( ) : string | null
return string | null

getRequestHeaders() public method

Get the resource default request headers.
public getRequestHeaders ( ) : array
return array

getResponseHeaders() public method

Get the resource default response headers.
public getResponseHeaders ( ) : array
return array

getUri() public method

get the resource URI.
public getUri ( ) : string
return string

hasRequestHeaders() public method

Check if resource has default request headers set.
public hasRequestHeaders ( ) : boolean
return boolean

hasResponseHeaders() public method

Check if resource has default response headers set.
public hasResponseHeaders ( ) : boolean
return boolean

setResourceOnActions() protected method

Set the resource on each of the actions.
protected setResourceOnActions ( ) : void
return void

Property Details

$actions protected_oe property

Collection of actions belonging to a resource.
protected Collection,Illuminate\Support $actions
return Illuminate\Support\Collection

$annotations protected_oe property

Collection of annotations belonging to a resource.
protected Collection,Illuminate\Support $annotations
return Illuminate\Support\Collection

$identifier protected_oe property

Resource identifier.
protected string $identifier
return string

$reflector protected_oe property

Resource reflection instance.
protected ReflectionClass $reflector
return ReflectionClass

$requestHeaders protected_oe property

Collection of default request headers belonging to a resource.
protected array $requestHeaders
return array

$responseHeaders protected_oe property

Collection of default response headers belonging to a resource.
protected array $responseHeaders
return array