You are here

public function Constraint::getTargets in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Constraint.php \Symfony\Component\Validator\Constraint::getTargets()

Returns whether the constraint can be put onto classes, properties or both.

This method should return one or more of the constants Constraint::CLASS_CONSTRAINT and Constraint::PROPERTY_CONSTRAINT.

Return value

string|array One or more constant values

11 methods override Constraint::getTargets()
Callback::getTargets in vendor/symfony/validator/Constraints/Callback.php
Returns whether the constraint can be put onto classes, properties or both.
ClassConstraint::getTargets in vendor/symfony/validator/Tests/Fixtures/ClassConstraint.php
Returns whether the constraint can be put onto classes, properties or both.
ConstraintA::getTargets in vendor/symfony/validator/Tests/Fixtures/ConstraintA.php
Returns whether the constraint can be put onto classes, properties or both.
ConstraintB::getTargets in vendor/symfony/validator/Tests/Fixtures/ConstraintB.php
Returns whether the constraint can be put onto classes, properties or both.
ConstraintC::getTargets in vendor/symfony/validator/Tests/Fixtures/ConstraintC.php
Returns whether the constraint can be put onto classes, properties or both.

... See full list

File

vendor/symfony/validator/Constraint.php, line 286

Class

Constraint
Contains the properties of a constraint definition.

Namespace

Symfony\Component\Validator

Code

public function getTargets() {
  return self::PROPERTY_CONSTRAINT;
}