You are here

final public function ChainDecoder::decode in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Encoder/ChainDecoder.php \Symfony\Component\Serializer\Encoder\ChainDecoder::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.

Return value

mixed

Throws

UnexpectedValueException

Overrides DecoderInterface::decode

File

vendor/symfony/serializer/Encoder/ChainDecoder.php, line 36

Class

ChainDecoder
Decoder delegating the decoding to a chain of decoders.

Namespace

Symfony\Component\Serializer\Encoder

Code

public final function decode($data, $format, array $context = array()) {
  return $this
    ->getDecoder($format)
    ->decode($data, $format, $context);
}