| 1 | <?php |
||
| 8 | trait MiddlewareCommon |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Disable flag |
||
| 12 | * |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | protected $disableFlag = 0; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Set flag to use to disable this middleware |
||
| 19 | * |
||
| 20 | * @param int $disableFlag |
||
| 21 | * @return $this |
||
| 22 | */ |
||
| 23 | 4 | public function setDisableFlag($disableFlag) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Get flag to use to disable this middleware |
||
| 31 | * |
||
| 32 | * @return int |
||
| 33 | */ |
||
| 34 | public function getDisableFlag() |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Check if this middlware is enabled |
||
| 41 | * |
||
| 42 | * @param int|true $excludeMiddleware |
||
| 43 | * @return bool |
||
| 44 | */ |
||
| 45 | 4 | protected function enabled($excludeMiddleware) |
|
| 55 | |||
| 56 | public function serialize() |
||
| 60 | |||
| 61 | public function unserialize($serialized) |
||
| 65 | } |
||
| 66 |