PHP Class WellCommerce\Bundle\ApiBundle\Request\RequestHandler

Author: Adam Piotrowski ([email protected])
Inheritance: implements WellCommerce\Bundle\ApiBundle\Request\RequestHandlerInterface
Mostra file Open project: wellcommerce/wellcommerce

Protected Properties

Property Type Description
$dataset WellCommerce\Component\DataSet\DataSetInterface
$manager WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface
$options array
$resourceType string
$serializer Symfony\Component\Serializer\SerializerInterface | Symfony\Component\Serializer\Normalizer\DenormalizerInterface | Symfony\Component\Serializer\Normalizer\NormalizerInterface

Public Methods

Method Description
__construct ( $resourceType, WellCommerce\Component\DataSet\DataSetInterface $dataset, WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface $manager, Symfony\Component\Serializer\SerializerInterface $serializer, array $options = [] ) RequestHandler constructor.
getDataset ( )
getManager ( )
getResourceType ( )
getSerializer ( )
handleCreateRequest ( Request $request )
handleDeleteRequest ( Request $request, $identifier )
handleGetRequest ( Request $request, $identifier )
handleListRequest ( Request $request )
handleUpdateRequest ( Request $request, $identifier )

Protected Methods

Method Description
configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $resolver )
getResourceById ( integer $identifier ) : object Returns the resource by its identifier or throws an exception if it was not found

Method Details

__construct() public method

RequestHandler constructor.
public __construct ( $resourceType, WellCommerce\Component\DataSet\DataSetInterface $dataset, WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface $manager, Symfony\Component\Serializer\SerializerInterface $serializer, array $options = [] )
$resourceType
$dataset WellCommerce\Component\DataSet\DataSetInterface
$manager WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface
$serializer Symfony\Component\Serializer\SerializerInterface
$options array

configureOptions() protected method

protected configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $resolver )
$resolver Symfony\Component\OptionsResolver\OptionsResolver

getDataset() public method

public getDataset ( )

getManager() public method

public getManager ( )

getResourceById() protected method

Returns the resource by its identifier or throws an exception if it was not found
protected getResourceById ( integer $identifier ) : object
$identifier integer
return object

getResourceType() public method

public getResourceType ( )

getSerializer() public method

public getSerializer ( )

handleCreateRequest() public method

public handleCreateRequest ( Request $request )
$request Symfony\Component\HttpFoundation\Request

handleDeleteRequest() public method

public handleDeleteRequest ( Request $request, $identifier )
$request Symfony\Component\HttpFoundation\Request

handleGetRequest() public method

public handleGetRequest ( Request $request, $identifier )
$request Symfony\Component\HttpFoundation\Request

handleListRequest() public method

public handleListRequest ( Request $request )
$request Symfony\Component\HttpFoundation\Request

handleUpdateRequest() public method

public handleUpdateRequest ( Request $request, $identifier )
$request Symfony\Component\HttpFoundation\Request

Property Details

$dataset protected_oe property

protected DataSetInterface,WellCommerce\Component\DataSet $dataset
return WellCommerce\Component\DataSet\DataSetInterface

$manager protected_oe property

protected ManagerInterface,WellCommerce\Bundle\DoctrineBundle\Manager $manager
return WellCommerce\Bundle\DoctrineBundle\Manager\ManagerInterface

$options protected_oe property

protected array $options
return array

$resourceType protected_oe property

protected string $resourceType
return string

$serializer protected_oe property

protected SerializerInterface,Symfony\Component\Serializer|DenormalizerInterface,Symfony\Component\Serializer\Normalizer|NormalizerInterface,Symfony\Component\Serializer\Normalizer $serializer
return Symfony\Component\Serializer\SerializerInterface | Symfony\Component\Serializer\Normalizer\DenormalizerInterface | Symfony\Component\Serializer\Normalizer\NormalizerInterface