| 1 | <?php |
||
| 9 | abstract class AbstractMessageStrategy implements LoggerAwareInterface |
||
| 10 | { |
||
| 11 | use LoggerAwareTrait; |
||
| 12 | |||
| 13 | private $eventDispatcher; |
||
| 14 | private $eventError; |
||
| 15 | private $eventSuccess; |
||
| 16 | private $message; |
||
| 17 | |||
| 18 | public function __construct() |
||
| 23 | |||
| 24 | public function success() |
||
| 28 | |||
| 29 | public function error() |
||
| 33 | |||
| 34 | public function getEventDispatcher() |
||
| 38 | |||
| 39 | public function setEventDispatcher(EventDispatcher $eventDispatcher) |
||
| 43 | |||
| 44 | public function getMessage() |
||
| 48 | |||
| 49 | public function setMessage(Message $message) |
||
| 53 | |||
| 54 | public function on($eventName, $callback) |
||
| 58 | |||
| 59 | abstract public function execute(); |
||
| 60 | } |
||
| 61 |
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.