vendor/api-platform/core/src/Core/DataProvider/ItemDataProviderInterface.php line 34

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 items from a persistence layer.
  15. *
  16. * @author Kévin Dunglas <dunglas@gmail.com>
  17. */
  18. interface ItemDataProviderInterface
  19. {
  20. /**
  21. * Retrieves an item.
  22. *
  23. * @param array|int|object|string $id
  24. *
  25. * @throws ResourceClassNotSupportedException
  26. *
  27. * @return object|null
  28. */
  29. public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []);
  30. }