PHP Class Drahak\Restful\Application\UI\ResourcePresenter

Author: Drahomír Hanák
Inheritance: extends Nette\Application\UI\Presenter, implements Drahak\Restful\Application\IResourcePresenter
Afficher le fichier Open project: drahak/restful Class Usage Examples

Protected Properties

Свойство Type Description
$authentication Drahak\Restful\Security\AuthenticationContext
$requestFilter Drahak\Restful\Utils\RequestFilter
$resource Drahak\Restful\IResource
$resourceFactory Drahak\Restful\IResourceFactory
$responseFactory Drahak\Restful\Application\IResponseFactory

Méthodes publiques

Méthode Description
checkRequirements ( $element ) Check security and other presenter requirements
formatValidateMethod ( $action ) Validate action method
getInput ( ) : Drahak\Restful\Http\IInput Get input
injectDrahakRestful ( Drahak\Restful\Application\IResponseFactory $responseFactory, Drahak\Restful\IResourceFactory $resourceFactory, Drahak\Restful\Security\AuthenticationContext $authentication, InputFactory $inputFactory, Drahak\Restful\Utils\RequestFilter $requestFilter ) Inject Drahak Restful
link ( string $destination, array $args = [], string $rel = Link::SELF ) : Drahak\Restful\Resource\Link Create resource link representation object
sendResource ( string $contentType = NULL ) : Nette\Application\IResponse Get REST API response

Méthodes protégées

Méthode Description
beforeRender ( ) On before render
createErrorResource ( Exception | Throwable $e ) : Drahak\Restful\IResource Create error response from exception
sendErrorResource ( Exception | Throwable $e, $contentType = NULL ) Send error resource to output
startup ( ) Presenter startup

Method Details

beforeRender() protected méthode

On before render
protected beforeRender ( )

checkRequirements() public méthode

Check security and other presenter requirements
public checkRequirements ( $element )
$element

createErrorResource() protected méthode

Create error response from exception
protected createErrorResource ( Exception | Throwable $e ) : Drahak\Restful\IResource
$e Exception | Throwable
Résultat Drahak\Restful\IResource

formatValidateMethod() public static méthode

Validate action method
public static formatValidateMethod ( $action )

getInput() public méthode

Get input
public getInput ( ) : Drahak\Restful\Http\IInput
Résultat Drahak\Restful\Http\IInput

injectDrahakRestful() final public méthode

Inject Drahak Restful
final public injectDrahakRestful ( Drahak\Restful\Application\IResponseFactory $responseFactory, Drahak\Restful\IResourceFactory $resourceFactory, Drahak\Restful\Security\AuthenticationContext $authentication, InputFactory $inputFactory, Drahak\Restful\Utils\RequestFilter $requestFilter )
$responseFactory Drahak\Restful\Application\IResponseFactory
$resourceFactory Drahak\Restful\IResourceFactory
$authentication Drahak\Restful\Security\AuthenticationContext
$inputFactory Drahak\Restful\Http\InputFactory
$requestFilter Drahak\Restful\Utils\RequestFilter

sendErrorResource() protected méthode

Send error resource to output
protected sendErrorResource ( Exception | Throwable $e, $contentType = NULL )
$e Exception | Throwable

sendResource() public méthode

Get REST API response
public sendResource ( string $contentType = NULL ) : Nette\Application\IResponse
$contentType string
Résultat Nette\Application\IResponse

startup() protected méthode

Presenter startup
protected startup ( )

Property Details

$authentication protected_oe property

protected AuthenticationContext,Drahak\Restful\Security $authentication
Résultat Drahak\Restful\Security\AuthenticationContext

$requestFilter protected_oe property

protected RequestFilter,Drahak\Restful\Utils $requestFilter
Résultat Drahak\Restful\Utils\RequestFilter

$resource protected_oe property

protected IResource,Drahak\Restful $resource
Résultat Drahak\Restful\IResource

$resourceFactory protected_oe property

protected IResourceFactory,Drahak\Restful $resourceFactory
Résultat Drahak\Restful\IResourceFactory

$responseFactory protected_oe property

protected IResponseFactory,Drahak\Restful\Application $responseFactory
Résultat Drahak\Restful\Application\IResponseFactory