Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SerializerInterface.php

function SerializerInterface::serialize

Serializes data in the appropriate format.

Parameters

array<string, mixed> $context Options normalizers/encoders have access to:

2 methods override SerializerInterface::serialize()
Serializer::serialize in vendor/symfony/serializer/Serializer.php
Serializes data in the appropriate format.
TraceableSerializer::serialize in vendor/symfony/serializer/Debug/TraceableSerializer.php
Serializes data in the appropriate format.

File

vendor/symfony/serializer/SerializerInterface.php, line 24

Class

SerializerInterface
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Symfony\Component\Serializer

Code

public function serialize(mixed $data, string $format, array $context = []) : string;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal