MessageContent can take either a Message or a message key in
the constructor. Since Message::content() is an instance method,
it makes sense to pass the instance itself rather than just
the key. This fixes cases where RawMessage::content() is called,
since passing RawMessage's key to MessageContent will not work
properly.
Change-Id: Ic3b935e5ac997df07eea40b438445ebd5024e306
*/
public function content() {
if ( !$this->content ) {
- $this->content = new MessageContent( $this->key );
+ $this->content = new MessageContent( $this );
}
return $this->content;