Symfony\Component\Validator\Mapping\ClassMetadata
Represents all the configured constraints on a given class.
- Author: Bernhard Schussek <bschussek@gmail.com>
Synopsis
class ClassMetadata
extends ElementMetadata
implements
MetadataInterface,ClassBasedInterface,PropertyMetadataContainerInterface
{
- // members
- public string $name;
- public string $defaultGroup;
- public array $members;
- public array $properties;
- public array $getters;
- public array $groupSequence;
- public Boolean $groupSequenceProvider;
- private ReflectionClass $reflClass;
- // Inherited members from ElementMetadata
- public array $constraints;
- public array $constraintsByGroup;
- // methods
- public void __construct()
- public void accept()
- public array __sleep()
- public string getClassName()
- public string getDefaultGroup()
- public void addConstraint()
- public ClassMetadata addPropertyConstraint()
- public ClassMetadata addGetterConstraint()
- public void mergeConstraints()
- protected void addMemberMetadata()
- public Boolean hasMemberMetadatas()
- public array getMemberMetadatas()
- public void hasPropertyMetadata()
- public void getPropertyMetadata()
- public array getConstrainedProperties()
- public ClassMetadata setGroupSequence()
- public Boolean hasGroupSequence()
- public array getGroupSequence()
- public ReflectionClass getReflectionClass()
- public void setGroupSequenceProvider()
- public Boolean isGroupSequenceProvider()
- // Inherited methods from ElementMetadata
- public array __sleep()
- public void __clone()
- public ElementMetadata addConstraint()
- public array getConstraints()
- public Boolean hasConstraints()
- public array findConstraints()
Hierarchy
Extends
Implements
Members
private
- $reflClass — \ReflectionClass
public
- $constraints — array
- $constraintsByGroup — array
- $defaultGroup — string
- $getters — array
- $groupSequence — array
- $groupSequenceProvider — Symfony\Component\Validator\Mapping\Boolean
- $members — array
- $name — string
- $properties — array
Methods
protected
- addMemberMetadata() — Adds a member metadata.
public
- __construct() — Constructs a metadata for the given class
- __sleep() — Returns the properties to be serialized
- accept()
- addConstraint() — {@inheritDoc}
- addGetterConstraint() — Adds a constraint to the getter of the given property.
- addPropertyConstraint() — Adds a constraint to the given property.
- getClassName() — Returns the fully qualified name of the class
- getConstrainedProperties() — Returns all properties for which constraints are defined.
- getDefaultGroup() — Returns the name of the default group for this class
- getGroupSequence() — Returns the default group sequence for this class.
- getMemberMetadatas() — Returns all metadatas of members describing the given property.
- getPropertyMetadata() — {@inheritdoc}
- getReflectionClass() — Returns a ReflectionClass instance for this class.
- hasGroupSequence() — Returns whether this class has an overridden default group sequence.
- hasMemberMetadatas() — Returns true if metadatas of members is present for the given property.
- hasPropertyMetadata() — {@inheritdoc}
- isGroupSequenceProvider() — Returns whether the class is a group sequence provider.
- mergeConstraints() — Merges the constraints of the given metadata into this object.
- setGroupSequence() — Sets the default group sequence for this class.
- setGroupSequenceProvider() — Sets whether a group sequence provider should be used.
Inherited from Symfony\Component\Validator\Mapping\ElementMetadata
public
- __clone() — Clones this object.
- __sleep() — Returns the names of the properties that should be serialized.
- addConstraint() — Adds a constraint to this element.
- findConstraints() — Returns the constraints of the given group and global ones (* group).
- getConstraints() — Returns all constraints of this element.
- hasConstraints() — Returns whether this element has any constraints.