You are here

public function Callback::getTargets in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Constraints/Callback.php \Symfony\Component\Validator\Constraints\Callback::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

Overrides Constraint::getTargets

File

vendor/symfony/validator/Constraints/Callback.php, line 75

Class

Callback
@Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"})

Namespace

Symfony\Component\Validator\Constraints

Code

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