60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
name: ChainDecoder
|
|
class_comment: '# * Decoder delegating the decoding to a chain of decoders.
|
|
|
|
# *
|
|
|
|
# * @author Jordi Boggiano <j.boggiano@seld.be>
|
|
|
|
# * @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
|
|
|
# * @author Lukas Kahwe Smith <smith@pooteeweet.org>
|
|
|
|
# *
|
|
|
|
# * @final'
|
|
dependencies:
|
|
- name: RuntimeException
|
|
type: class
|
|
source: Symfony\Component\Serializer\Exception\RuntimeException
|
|
properties: []
|
|
methods:
|
|
- name: __construct
|
|
visibility: public
|
|
parameters:
|
|
- name: decoders
|
|
default: '[]'
|
|
comment: "# * Decoder delegating the decoding to a chain of decoders.\n# *\n# *\
|
|
\ @author Jordi Boggiano <j.boggiano@seld.be>\n# * @author Johannes M. Schmitt\
|
|
\ <schmittjoh@gmail.com>\n# * @author Lukas Kahwe Smith <smith@pooteeweet.org>\n\
|
|
# *\n# * @final\n# */\n# class ChainDecoder implements ContextAwareDecoderInterface\n\
|
|
# {\n# /**\n# * @var array<string, array-key>\n# */\n# private array $decoderByFormat\
|
|
\ = [];\n# \n# /**\n# * @param array<DecoderInterface> $decoders"
|
|
- name: decode
|
|
visibility: public
|
|
parameters:
|
|
- name: data
|
|
- name: format
|
|
- name: context
|
|
default: '[]'
|
|
comment: null
|
|
- name: supportsDecoding
|
|
visibility: public
|
|
parameters:
|
|
- name: format
|
|
- name: context
|
|
default: '[]'
|
|
comment: null
|
|
- name: getDecoder
|
|
visibility: private
|
|
parameters:
|
|
- name: format
|
|
- name: context
|
|
comment: '# * Gets the decoder supporting the format.
|
|
|
|
# *
|
|
|
|
# * @throws RuntimeException if no decoder is found'
|
|
traits:
|
|
- Symfony\Component\Serializer\Exception\RuntimeException
|
|
interfaces:
|
|
- ContextAwareDecoderInterface
|