vendor/api-platform/core/src/Serializer/SerializerContextBuilderInterface.php line 31

  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\Serializer;
  12. use ApiPlatform\Exception\RuntimeException;
  13. use Symfony\Component\HttpFoundation\Request;
  14. /**
  15.  * Builds the context used by the Symfony Serializer.
  16.  *
  17.  * @author Kévin Dunglas <dunglas@gmail.com>
  18.  */
  19. interface SerializerContextBuilderInterface
  20. {
  21.     /**
  22.      * Creates a serialization context from a Request.
  23.      *
  24.      * @throws RuntimeException
  25.      */
  26.     public function createFromRequest(Request $requestbool $normalization, array $extractedAttributes null): array;
  27. }