1 | <?php |
||
9 | class LolHandler extends AbstractHandler |
||
10 | { |
||
11 | private |
||
12 | $lolifier; |
||
|
|||
13 | |||
14 | protected |
||
15 | $handler, |
||
16 | $bubble; |
||
17 | |||
18 | 5 | public function __construct($handler, Lolifier $lolifier, $bubble = true) |
|
19 | { |
||
20 | 5 | $this->handler = $handler; |
|
21 | 5 | $this->lolifier = $lolifier; |
|
22 | 5 | $this->bubble = $bubble; |
|
23 | |||
24 | 5 | if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { |
|
25 | throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); |
||
26 | } |
||
27 | 5 | } |
|
28 | |||
29 | public function isHandling(array $record) |
||
33 | |||
34 | 5 | public function handle(array $record) |
|
55 | } |
||
56 |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.