ClassMetadata::addPropertyConstraints()

ClassMetadata addPropertyConstraints(string $property, array $constraints) Parameters string $property array $constraints Return Value ClassMetadata

ClassMetadata::addPropertyConstraint()

ClassMetadata addPropertyConstraint(string $property, Constraint $constraint) Adds a constraint to the given property. Parameters string $property The name of the property Constraint $constraint The constraint Return Value ClassMetadata This object

ClassMetadata::addGetterConstraint()

ClassMetadata addGetterConstraint(string $property, Constraint $constraint) Adds a constraint to the getter of the given property. The name of the getter is assumed to be the name of the property with an uppercased first letter and either the prefix "get" or "is". Parameters string $property The name of the property Constraint $constraint The constraint Return Value ClassMetadata This object

ClassMetadata::addAttributeMetadata()

addAttributeMetadata(AttributeMetadataInterface $attributeMetadata) Adds an {@link AttributeMetadataInterface}. Parameters AttributeMetadataInterface $attributeMetadata

ClassMetadata::addGetterConstraints()

ClassMetadata addGetterConstraints(string $property, array $constraints) Parameters string $property array $constraints Return Value ClassMetadata

ClassMetadata

class ClassMetadata extends GenericMetadata implements ClassMetadataInterface Default implementation of {@link ClassMetadataInterface}. This class supports serialization and cloning. Properties Constraint[] $constraints from GenericMetadata array $constraintsByGroup from GenericMetadata int $cascadingStrategy The strategy for cascading objects. from GenericMetadata int $traversalStrategy The strategy for traversing traversable objects. string $name string $defaultGroup M

ClassMetadata::addConstraint()

GenericMetadata addConstraint(Constraint $constraint) Adds a constraint. If the constraint {@link Valid} is added, the cascading strategy will be changed to {@link CascadingStrategy::CASCADE}. Depending on the $traverse property of that constraint, the traversal strategy will be set to one of the following: {@link TraversalStrategy::IMPLICIT} if $traverse is enabled {@link TraversalStrategy::NONE} if $traverse is disabled Parameters Constraint $constraint The constraint to add

ClassMetadata

class ClassMetadata implements ClassMetadataInterface {@inheritdoc} Properties string $name AttributeMetadataInterface[] $attributesMetadata Methods __construct(string $class) Constructs a metadata for the given class. string getName() Returns the name of the backing PHP class. addAttributeMetadata(AttributeMetadataInterface $attributeMetadata) Adds an {@link AttributeMetadataInterface}. AttributeMetadataInterface[] getAttributesMetadata() Gets the list of {@link

ClassMapGenerator::createMap()

static array createMap(Iterator|string $dir) Iterate over all files in the given directory searching for classes. Parameters Iterator|string $dir The directory to search in or an iterator Return Value array A class map array

ClassMapGenerator

class ClassMapGenerator ClassMapGenerator. Methods static dump(array|string $dirs, string $file) Generate a class map file. static array createMap(Iterator|string $dir) Iterate over all files in the given directory searching for classes. Details static dump(array|string $dirs, string $file) Generate a class map file. Parameters array|string $dirs Directories or a single path to search in string $file The name of the class map file