12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?php
- namespace Symfony\Contracts\EventDispatcher;
- use Psr\EventDispatcher\StoppableEventInterface;
- if (interface_exists(StoppableEventInterface::class)) {
-
- class Event implements StoppableEventInterface
- {
- private $propagationStopped = false;
-
- public function isPropagationStopped(): bool
- {
- return $this->propagationStopped;
- }
-
- public function stopPropagation(): void
- {
- $this->propagationStopped = true;
- }
- }
- } else {
-
- class Event
- {
- private $propagationStopped = false;
-
- public function isPropagationStopped(): bool
- {
- return $this->propagationStopped;
- }
-
- public function stopPropagation(): void
- {
- $this->propagationStopped = true;
- }
- }
- }
|