PHP Class Lemon\RestBundle\Controller\ResourceController

Show file Open project: stanlemon/rest-bundle Class Usage Examples

Protected Properties

Property Type Description
$criteriaFactory Lemon\RestBundle\Object\Criteria\CriteriaFactory
$handler Lemon\RestBundle\Request\Handler
$response Symfony\Component\HttpFoundation\Response
$router Symfony\Component\Routing\RouterInterface

Public Methods

Method Description
__construct ( Handler $handler, CriteriaFactory $criteriaFactory, Symfony\Component\Routing\RouterInterface $router )
deleteAction ( Request $request, string $resource, integer $id ) : Response
getAction ( Request $request, string $resource, integer $id ) : Response
listAction ( Request $request, string $resource ) : Response
optionsAction ( Request $request, $resource, $id = null )
patchAction ( Request $request, string $resource, integer $id ) : Response
postAction ( Request $request, string $resource ) : Response
putAction ( Request $request, string $resource, integer $id ) : Response

Method Details

__construct() public method

public __construct ( Handler $handler, CriteriaFactory $criteriaFactory, Symfony\Component\Routing\RouterInterface $router )
$handler Lemon\RestBundle\Request\Handler
$criteriaFactory Lemon\RestBundle\Object\Criteria\CriteriaFactory
$router Symfony\Component\Routing\RouterInterface

deleteAction() public method

public deleteAction ( Request $request, string $resource, integer $id ) : Response
$request Symfony\Component\HttpFoundation\Request
$resource string
$id integer
return Symfony\Component\HttpFoundation\Response

getAction() public method

public getAction ( Request $request, string $resource, integer $id ) : Response
$request Symfony\Component\HttpFoundation\Request
$resource string
$id integer
return Symfony\Component\HttpFoundation\Response

listAction() public method

public listAction ( Request $request, string $resource ) : Response
$request Symfony\Component\HttpFoundation\Request
$resource string
return Symfony\Component\HttpFoundation\Response

optionsAction() public method

public optionsAction ( Request $request, $resource, $id = null )
$request Symfony\Component\HttpFoundation\Request

patchAction() public method

public patchAction ( Request $request, string $resource, integer $id ) : Response
$request Symfony\Component\HttpFoundation\Request
$resource string
$id integer
return Symfony\Component\HttpFoundation\Response

postAction() public method

public postAction ( Request $request, string $resource ) : Response
$request Symfony\Component\HttpFoundation\Request
$resource string
return Symfony\Component\HttpFoundation\Response

putAction() public method

public putAction ( Request $request, string $resource, integer $id ) : Response
$request Symfony\Component\HttpFoundation\Request
$resource string
$id integer
return Symfony\Component\HttpFoundation\Response

Property Details

$criteriaFactory protected property

protected CriteriaFactory,Lemon\RestBundle\Object\Criteria $criteriaFactory
return Lemon\RestBundle\Object\Criteria\CriteriaFactory

$handler protected property

protected Handler,Lemon\RestBundle\Request $handler
return Lemon\RestBundle\Request\Handler

$response protected property

protected Response,Symfony\Component\HttpFoundation $response
return Symfony\Component\HttpFoundation\Response

$router protected property

protected RouterInterface,Symfony\Component\Routing $router
return Symfony\Component\Routing\RouterInterface