| Total Complexity | 6 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class CheckLanguageDetectionEvent extends AbstractEvent implements StoppableEventInterface |
||
| 12 | { |
||
| 13 | private bool $handle = true; |
||
| 14 | |||
| 15 | public function __construct( |
||
| 16 | private SiteInterface $site, |
||
| 17 | private ServerRequestInterface $request |
||
| 18 | ) {} |
||
| 19 | |||
| 20 | public function getSite(): SiteInterface |
||
| 21 | { |
||
| 22 | return $this->site; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getRequest(): ServerRequestInterface |
||
| 26 | { |
||
| 27 | return $this->request; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function isLanguageDetectionEnable(): bool |
||
| 31 | { |
||
| 32 | return $this->handle; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function disableLanguageDetection(): void |
||
| 36 | { |
||
| 37 | $this->handle = false; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function isPropagationStopped(): bool |
||
| 43 | } |
||
| 44 | } |
||
| 45 |