| 1 | <?php |
||
| 8 | abstract class AbstractHandler implements HandlerInterface |
||
| 9 | { |
||
| 10 | protected $output_allowed = true; |
||
| 11 | |||
| 12 | abstract public function initialize(); |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param string $message |
||
| 16 | * @return bool |
||
| 17 | */ |
||
| 18 | abstract public function write($message); |
||
| 19 | |||
| 20 | 2 | public function allowOutput() |
|
| 24 | |||
| 25 | 4 | public function suppressOutput() |
|
| 29 | } |
||
| 30 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.