* Set the Title object
*
* @param Title $t
+ * @throws MWException
*/
- public function setTitle( Title $t ) {
+ public function setTitle( $t ) {
+ if ( $t !== null && !$t instanceof Title ) {
+ throw new MWException( __METHOD__ . " expects an instance of Title" );
+ }
$this->title = $t;
}
*/
public function msg() {
$args = func_get_args();
+
return call_user_func_array( 'wfMessage', $args )->setContext( $this );
}
}