vendor/api-platform/core/src/Core/DataProvider/SubresourceDataProviderInterface.php line 36

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the API Platform project.
  4. *
  5. * (c) Kévin Dunglas <dunglas@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. declare(strict_types=1);
  11. namespace ApiPlatform\Core\DataProvider;
  12. use ApiPlatform\Exception\ResourceClassNotSupportedException;
  13. /**
  14. * Retrieves subresources from a persistence layer.
  15. *
  16. * @author Antoine Bluchet <soyuka@gmail.com>
  17. */
  18. interface SubresourceDataProviderInterface
  19. {
  20. /**
  21. * Retrieves a subresource of an item.
  22. *
  23. * @param string $resourceClass The root resource class
  24. * @param array $identifiers Identifiers and their values
  25. * @param array $context The context indicates the conjunction between collection properties (identifiers) and their class
  26. *
  27. * @throws ResourceClassNotSupportedException
  28. *
  29. * @return iterable|object|null
  30. */
  31. public function getSubresource(string $resourceClass, array $identifiers, array $context, string $operationName = null);
  32. }