* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace ApiPlatform\Serializer; use ApiPlatform\Exception\RuntimeException; use Symfony\Component\HttpFoundation\Request; /** * Builds the context used by the Symfony Serializer. * * @author Kévin Dunglas */ interface SerializerContextBuilderInterface { /** * Creates a serialization context from a Request. * * @throws RuntimeException */ public function createFromRequest(Request $request, bool $normalization, array $extractedAttributes = null): array; }