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

Breadcrumb

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

function DecoderInterface::decode

Decodes a string into PHP data.

Parameters

string $data Data to decode:

string $format Format name:

array $context Options that decoders have access to:

The format parameter specifies which format the data is in; valid values depend on the specific implementation. Authors implementing this interface are encouraged to document which formats they support in a non-inherited phpdoc comment.

Throws

UnexpectedValueException

10 methods override DecoderInterface::decode()
ChainDecoder::decode in vendor/symfony/serializer/Encoder/ChainDecoder.php
Decodes a string into PHP data.
CsvEncoder::decode in vendor/symfony/serializer/Encoder/CsvEncoder.php
Decodes a string into PHP data.
JsonDecode::decode in vendor/symfony/serializer/Encoder/JsonDecode.php
Decodes data.
JsonEncoder::decode in vendor/symfony/serializer/Encoder/JsonEncoder.php
Decodes a string into PHP data.
Serializer::decode in vendor/symfony/serializer/Serializer.php
Decodes a string into PHP data.

... See full list

File

vendor/symfony/serializer/Encoder/DecoderInterface.php, line 35

Class

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

Namespace

Symfony\Component\Serializer\Encoder

Code

public function decode(string $data, string $format, array $context = []) : mixed;
RSS feed
Powered by Drupal