MemberMetadata
extends GenericMetadata
in package
implements
PropertyMetadataInterface
Stores all metadata needed for validating a class property.
The method of accessing the property's value must be specified by subclasses by implementing the method.
This class supports serialization and cloning.
Tags
Table of Contents
Interfaces
- PropertyMetadataInterface
- Stores all metadata needed for validating the value of a class property.
Properties
- $reflMember : array<string|int, ReflectionMethod>|array<string|int, ReflectionProperty>
Methods
- __clone() : mixed
- Clones this object.
- __construct() : mixed
- __sleep() : array<string|int, string>
- Returns the names of the properties that should be serialized.
- addConstraint() : $this
- Adds a constraint.
- addConstraints() : $this
- Adds an list of constraints.
- findConstraints() : array<string|int, Constraint>
- Returns all constraints for a given validation group.
- getAutoMappingStrategy() : int
- getCascadingStrategy() : int
- Returns the strategy for cascading objects.
- getClassName() : mixed
- {@inheritdoc}
- getConstraints() : array<string|int, Constraint>
- Returns all constraints of this element.
- getName() : string
- Returns the name of the member.
- getPropertyName() : string
- Returns the name of the property.
- getReflectionMember() : ReflectionMethod|ReflectionProperty
- Returns the reflection instance for accessing the member's value.
- getTraversalStrategy() : int
- Returns the strategy for traversing traversable objects.
- hasConstraints() : bool
- Returns whether this element has any constraints.
- isPrivate() : bool
- Returns whether this member is private.
- isProtected() : bool
- Returns whether this member is protected.
- isPublic() : bool
- Returns whether this member is public.
- newReflectionMember() : ReflectionMethod|ReflectionProperty
- Creates a new reflection instance for accessing the member's value.
- checkConstraint() : mixed
Properties
$reflMember
private
array<string|int, ReflectionMethod>|array<string|int, ReflectionProperty>
$reflMember
= []
Methods
__clone()
Clones this object.
public
__clone() : mixed
__construct()
public
__construct(string $class, string $name, string $property) : mixed
Parameters
- $class : string
-
The name of the class this member is defined on
- $name : string
-
The name of the member
- $property : string
-
The property the member belongs to
__sleep()
Returns the names of the properties that should be serialized.
public
__sleep() : array<string|int, string>
Return values
array<string|int, string>addConstraint()
Adds a constraint.
public
addConstraint(Constraint $constraint) : $this
Parameters
- $constraint : Constraint
Return values
$thisaddConstraints()
Adds an list of constraints.
public
addConstraints(array<string|int, Constraint> $constraints) : $this
Parameters
- $constraints : array<string|int, Constraint>
-
The constraints to add
Return values
$thisfindConstraints()
Returns all constraints for a given validation group.
public
findConstraints(string $group) : array<string|int, Constraint>
Aware of the global group (* group).
Parameters
- $group : string
-
The validation group
Return values
array<string|int, Constraint>getAutoMappingStrategy()
public
getAutoMappingStrategy() : int
Tags
Return values
intgetCascadingStrategy()
Returns the strategy for cascading objects.
public
getCascadingStrategy() : int
Return values
intgetClassName()
{@inheritdoc}
public
getClassName() : mixed
getConstraints()
Returns all constraints of this element.
public
getConstraints() : array<string|int, Constraint>
Return values
array<string|int, Constraint>getName()
Returns the name of the member.
public
getName() : string
Return values
stringgetPropertyName()
Returns the name of the property.
public
getPropertyName() : string
Return values
stringgetReflectionMember()
Returns the reflection instance for accessing the member's value.
public
getReflectionMember(object|string $objectOrClassName) : ReflectionMethod|ReflectionProperty
Parameters
- $objectOrClassName : object|string
Return values
ReflectionMethod|ReflectionPropertygetTraversalStrategy()
Returns the strategy for traversing traversable objects.
public
getTraversalStrategy() : int
Return values
inthasConstraints()
Returns whether this element has any constraints.
public
hasConstraints() : bool
Return values
boolisPrivate()
Returns whether this member is private.
public
isPrivate(object|string $objectOrClassName) : bool
Parameters
- $objectOrClassName : object|string
Return values
boolisProtected()
Returns whether this member is protected.
public
isProtected(object|string $objectOrClassName) : bool
Parameters
- $objectOrClassName : object|string
Return values
boolisPublic()
Returns whether this member is public.
public
isPublic(object|string $objectOrClassName) : bool
Parameters
- $objectOrClassName : object|string
Return values
boolnewReflectionMember()
Creates a new reflection instance for accessing the member's value.
protected
abstract newReflectionMember(object|string $objectOrClassName) : ReflectionMethod|ReflectionProperty
Parameters
- $objectOrClassName : object|string
Return values
ReflectionMethod|ReflectionPropertycheckConstraint()
private
checkConstraint(Constraint $constraint) : mixed
Parameters
- $constraint : Constraint