Class

Symfony\Component\Validator\Mapping\ElementMetadata

abstract class ElementMetadata

Properties

$constraints
$constraintsByGroup

Methods

array __sleep()

Returns the names of the properties that should be serialized.

__clone()

Clones this object.

addConstraint(Constraint $constraint)

Adds a constraint to this element.

array getConstraints()

Returns all constraints of this element.

Boolean hasConstraints()

Returns whether this element has any constraints.

array findConstraints(string $group)

Returns the constraints of the given group and global ones (* group).

Details

at line 26
public array __sleep()

Returns the names of the properties that should be serialized.

Return Value

array

at line 37
public __clone()

Clones this object.

at line 54
public addConstraint(Constraint $constraint)

Adds a constraint to this element.

Parameters

Constraint $constraint

at line 70
public array getConstraints()

Returns all constraints of this element.

Return Value

array An array of Constraint instances

at line 80
public Boolean hasConstraints()

Returns whether this element has any constraints.

Return Value

Boolean

at line 92
public array findConstraints(string $group)

Returns the constraints of the given group and global ones (* group).

Parameters

string $group The group name

Return Value

array An array with all Constraint instances belonging to the group