api/symfony/Component/Serializer/Normalizer/DenormalizerInterface.yaml
2024-09-26 02:03:21 -07:00

106 lines
4 KiB
YAML

name: DenormalizerInterface
class_comment: null
dependencies:
- name: BadMethodCallException
type: class
source: Symfony\Component\Serializer\Exception\BadMethodCallException
- name: ExceptionInterface
type: class
source: Symfony\Component\Serializer\Exception\ExceptionInterface
- name: ExtraAttributesException
type: class
source: Symfony\Component\Serializer\Exception\ExtraAttributesException
- name: InvalidArgumentException
type: class
source: Symfony\Component\Serializer\Exception\InvalidArgumentException
- name: LogicException
type: class
source: Symfony\Component\Serializer\Exception\LogicException
- name: RuntimeException
type: class
source: Symfony\Component\Serializer\Exception\RuntimeException
- name: UnexpectedValueException
type: class
source: Symfony\Component\Serializer\Exception\UnexpectedValueException
properties: []
methods:
- name: denormalize
visibility: public
parameters:
- name: data
- name: type
- name: format
default: 'null'
- name: context
default: '[]'
comment: "# * @author Jordi Boggiano <j.boggiano@seld.be>\n# */\n# interface DenormalizerInterface\n\
# {\n# public const COLLECT_DENORMALIZATION_ERRORS = 'collect_denormalization_errors';\n\
# \n# /**\n# * Denormalizes data back into an object of the given class.\n# *\n\
# * @param mixed $data Data to restore\n# * @param string $type\
\ The expected class to instantiate\n# * @param string|null $format Format\
\ the given data was extracted from\n# * @param array $context Options available\
\ to the denormalizer\n# *\n# * @throws BadMethodCallException Occurs when the\
\ normalizer is not called in an expected context\n# * @throws InvalidArgumentException\
\ Occurs when the arguments are not coherent or not supported\n# * @throws UnexpectedValueException\
\ Occurs when the item cannot be hydrated with the given data\n# * @throws ExtraAttributesException\
\ Occurs when the item doesn't have attribute to receive given data\n# * @throws\
\ LogicException Occurs when the normalizer is not supposed to denormalize\n\
# * @throws RuntimeException Occurs if the class cannot be instantiated\n\
# * @throws ExceptionInterface Occurs for all the other cases of errors"
- name: supportsDenormalization
visibility: public
parameters:
- name: data
- name: type
- name: format
default: 'null'
- name: context
default: '[]'
comment: '# * Checks whether the given class is supported for denormalization by
this normalizer.
# *
# * @param mixed $data Data to denormalize from
# * @param string $type The class to which the data should be denormalized
# * @param string|null $format The format being deserialized from'
- name: getSupportedTypes
visibility: public
parameters:
- name: format
comment: '# * Returns the types potentially supported by this denormalizer.
# *
# * For each supported formats (if applicable), the supported types should be
# * returned as keys, and each type should be mapped to a boolean indicating
# * if the result of supportsDenormalization() can be cached or not
# * (a result cannot be cached when it depends on the context or on the data.)
# * A null value means that the denormalizer does not support the corresponding
# * type.
# *
# * Use type "object" to match any classes or interfaces,
# * and type "*" to match any types.
# *
# * @return array<class-string|''*''|''object''|string, bool|null>'
traits:
- Symfony\Component\Serializer\Exception\BadMethodCallException
- Symfony\Component\Serializer\Exception\ExceptionInterface
- Symfony\Component\Serializer\Exception\ExtraAttributesException
- Symfony\Component\Serializer\Exception\InvalidArgumentException
- Symfony\Component\Serializer\Exception\LogicException
- Symfony\Component\Serializer\Exception\RuntimeException
- Symfony\Component\Serializer\Exception\UnexpectedValueException
interfaces: []