| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function __construct($message, $type = self::TYPE_SUCCESS, $method = self::METHOD_APPEND) |
||
| 20 | { |
||
| 21 | parent::__construct(); |
||
| 22 | $this->registerOption(self::OPTION_TYPE); |
||
| 23 | |||
| 24 | $this->setOption(self::OPTION_TYPE, $type); |
||
| 25 | $this->setOption(self::OPTION_TARGET, $this::$container); |
||
| 26 | |||
| 27 | $value = $this::$template; |
||
| 28 | $value = str_replace('%type%', $type, $value); |
||
| 29 | $value = str_replace('%value%', $message, $value); |
||
| 30 | |||
| 31 | if ($method == self::METHOD_APPEND) { |
||
| 32 | $this->append($value); |
||
| 33 | } else { |
||
| 34 | $this->html($value); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 |