Validator.php 769 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Gedmo\ReferenceIntegrity\Mapping;
  3. /**
  4. * This class is used to validate mapping information
  5. *
  6. * @author Evert Harmeling <evert.harmeling@freshheads.com>
  7. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  8. */
  9. class Validator
  10. {
  11. const NULLIFY = 'nullify';
  12. const PULL = 'pull';
  13. const RESTRICT = 'restrict';
  14. /**
  15. * List of actions which are valid as integrity check
  16. *
  17. * @var array
  18. */
  19. private $integrityActions = array(
  20. self::NULLIFY,
  21. self::PULL,
  22. self::RESTRICT,
  23. );
  24. /**
  25. * Returns a list of available integrity actions
  26. *
  27. * @return array
  28. */
  29. public function getIntegrityActions()
  30. {
  31. return $this->integrityActions;
  32. }
  33. }