Callback.php 755 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Validator\Constraints;
  11. use Symfony\Component\Validator\Constraint;
  12. class Callback extends Constraint
  13. {
  14. public $methods;
  15. /**
  16. * {@inheritDoc}
  17. */
  18. public function getRequiredOptions()
  19. {
  20. return array('methods');
  21. }
  22. /**
  23. * {@inheritDoc}
  24. */
  25. public function getDefaultOption()
  26. {
  27. return 'methods';
  28. }
  29. /**
  30. * {@inheritDoc}
  31. */
  32. public function getTargets()
  33. {
  34. return self::CLASS_CONSTRAINT;
  35. }
  36. }