SchemaEventArgs.php 508 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Doctrine\DBAL\Event;
  3. use Doctrine\Common\EventArgs;
  4. /**
  5. * Base class for schema related events.
  6. */
  7. class SchemaEventArgs extends EventArgs
  8. {
  9. /** @var bool */
  10. private $preventDefault = false;
  11. /**
  12. * @return SchemaEventArgs
  13. */
  14. public function preventDefault()
  15. {
  16. $this->preventDefault = true;
  17. return $this;
  18. }
  19. /**
  20. * @return bool
  21. */
  22. public function isDefaultPrevented()
  23. {
  24. return $this->preventDefault;
  25. }
  26. }