MediaWiki  REL1_22
MWFunction.php
Go to the documentation of this file.
00001 <?php
00023 class MWFunction {
00024 
00030     public static function call( $callback ) {
00031         wfDeprecated( __METHOD__, '1.22' );
00032         $args = func_get_args();
00033         return call_user_func_array( 'call_user_func', $args );
00034     }
00035 
00042     public static function callArray( $callback, $argsarams ) {
00043         wfDeprecated( __METHOD__, '1.22' );
00044         return call_user_func_array( $callback, $argsarams );
00045     }
00046 
00052     public static function newObj( $class, $args = array() ) {
00053         if ( !count( $args ) ) {
00054             return new $class;
00055         }
00056 
00057         $ref = new ReflectionClass( $class );
00058         return $ref->newInstanceArgs( $args );
00059     }
00060 
00061 }