Checks if properties have been declared.
1 | <?php |
||
2 | |||
3 | namespace ByJG\RestServer\Middleware; |
||
4 | |||
5 | class MiddlewareResult |
||
6 | { |
||
7 | const STOP_PROCESSING_OTHERS = 'STOP_PROCESSING_OTHERS'; |
||
8 | const CONTINUE = 'CONTINUE'; |
||
9 | const STOP_PROCESSING = 'STOP_PROCESSING'; |
||
10 | |||
11 | protected $status = null; |
||
12 | |||
13 | 12 | protected function __construct($status) |
|
14 | { |
||
15 | 12 | $this->status = $status; |
|
16 | } |
||
17 | |||
18 | 2 | public static function stopProcessingOthers() |
|
19 | { |
||
20 | 2 | return new MiddlewareResult(MiddlewareResult::STOP_PROCESSING_OTHERS); |
|
21 | } |
||
22 | |||
23 | public static function stopProcessing() |
||
24 | { |
||
25 | return new MiddlewareResult(MiddlewareResult::STOP_PROCESSING); |
||
26 | } |
||
27 | |||
28 | 12 | public static function continue() |
|
29 | { |
||
30 | 12 | return new MiddlewareResult(MiddlewareResult::CONTINUE); |
|
31 | } |
||
32 | |||
33 | 10 | public function getStatus() |
|
34 | { |
||
35 | 10 | return $this->status; |
|
36 | } |
||
37 | |||
38 | public function getOutputProcessorClass() |
||
39 | { |
||
40 | return $this->outputProcessorClass; |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
41 | } |
||
42 | } |