12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- class RawMessage extends Message {
-
- public function __construct( $text, $params = [] ) {
- if ( !is_string( $text ) ) {
- throw new InvalidArgumentException( '$text must be a string' );
- }
- parent::__construct( $text, $params );
-
- $this->message = $text;
- }
-
- public function fetchMessage() {
-
- if ( $this->message === null ) {
- $this->message = $this->key;
- }
- return $this->message;
- }
- }
|