Constants
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::CIRCULAR_REFERENCE_LIMIT_COUNTERS
=
'circular_reference_limit_counters'
|
Properties
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
$classMetadataFactory
-
var
ClassMetadataFactoryInterface
|
null
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
$defaultContext
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
$nameConverter
-
var
NameConverterInterface
|
null
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
$serializer
|
Methods
|
protected
final
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
applyCallbacks
(
?
mixed
$value
,
object
|
string
$object
,
string
$attribute
,
?
string
$format
,
array
$context
) : ?
mixed
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
createChildContext
(
array
$parentContext
,
string
$attribute
,
?
string
$format
) :
array
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
denormalizeParameter
(
ReflectionClass
$class
,
ReflectionParameter
$parameter
,
string
$parameterName
,
?
mixed
$parameterData
,
array
$context
,
?
string
$format
=
NULL
) : ?
mixed
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
extractObjectToPopulate
(
string
$class
,
array
$context
,
?
string
$key
=
NULL
) : ?
object
Extract the object_to_populate field from the context if it exists
and is an instance of the provided $class.
-
param
string
$class
The class the object should be
-
param
string
|
null
$key
They in which to look for the object to populate.
Keeps backwards compatibility with AbstractNormalizer .
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
getAllowedAttributes
(
object
|
string
$classOrObject
,
array
$context
,
bool
$attributesAsString
=
false
)
Gets attributes to normalize using groups.
-
param
bool
$attributesAsString
If false, return an array of {@link AttributeMetadataInterface}
-
throws
LogicException
if the 'allow_extra_attributes' context variable is false and no class metadata factory is provided
-
return
string
[]|
AttributeMetadataInterface
[]|
bool
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
getConstructor
(
array
$data
,
string
$class
,
array
$context
,
ReflectionClass
$reflectionClass
,
array
|
bool
$allowedAttributes
) : ?
ReflectionMethod
Returns the method to use to construct an object. This method must be either
the object constructor or static.
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
getGroups
(
array
$context
) :
array
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
handleCircularReference
(
object
$object
,
?
string
$format
=
NULL
,
array
$context
=
[
]
) : ?
mixed
Handles a circular reference.
If a circular reference handler is set, it will be called. Otherwise, a
{@class CircularReferenceException} will be thrown.
-
final
-
throws
CircularReferenceException
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
instantiateObject
(
array
$data
,
string
$class
,
array
$context
,
ReflectionClass
$reflectionClass
,
array
|
bool
$allowedAttributes
,
?
string
$format
=
NULL
)
Instantiates an object using constructor parameters when needed.
This method also allows to denormalize data into an existing object if
it is present in the context with the object_to_populate. This object
is removed from the context before being returned to avoid side effects
when recursively normalizing an object graph.
-
return
object
-
throws
RuntimeException
-
throws
MissingConstructorArgumentsException
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
isAllowedAttribute
(
object
|
string
$classOrObject
,
string
$attribute
,
?
string
$format
=
NULL
,
array
$context
=
[
]
)
Is this attribute allowed?
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
isCircularReference
(
object
$object
,
array
$context
) :
bool
Detects if the configured circular reference limit is reached.
-
throws
CircularReferenceException
|
protected
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
prepareForDenormalization
(
?
mixed
$data
) :
array
Normalizes the given data to an array. It's particularly useful during
the denormalization process.
|
protected
final
Symfony\Component\Serializer\Normalizer\AbstractNormalizer
::
validateCallbackContext
(
array
$context
,
string
$contextType
=
''
) :
void
Validate callbacks set in context.
-
param
string
$contextType
Used to specify which context is invalid in exceptions
-
throws
InvalidArgumentException
|