PHP Class ApiPlatform\Core\EventListener\ReadListener

Author: Kévin Dunglas ([email protected])
ファイルを表示 Open project: api-platform/core Class Usage Examples

Public Methods

Method Description
__construct ( ApiPlatform\Core\DataProvider\CollectionDataProviderInterface $collectionDataProvider, ApiPlatform\Core\DataProvider\ItemDataProviderInterface $itemDataProvider )
onKernelRequest ( GetResponseEvent $event ) Calls the data provider and sets the data attribute.

Private Methods

Method Description
getCollectionData ( Request $request, array $attributes ) : array | Traversable | ApiPlatform\Core\DataProvider\PaginatorInterface | null Retrieves data for a collection operation.
getItemData ( Request $request, array $attributes ) : object | null Gets data for an item operation.

Method Details

__construct() public method

public __construct ( ApiPlatform\Core\DataProvider\CollectionDataProviderInterface $collectionDataProvider, ApiPlatform\Core\DataProvider\ItemDataProviderInterface $itemDataProvider )
$collectionDataProvider ApiPlatform\Core\DataProvider\CollectionDataProviderInterface
$itemDataProvider ApiPlatform\Core\DataProvider\ItemDataProviderInterface

onKernelRequest() public method

Calls the data provider and sets the data attribute.
public onKernelRequest ( GetResponseEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseEvent