MediaWiki  REL1_24
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 
00034         return call_user_func_array( 'call_user_func', $args );
00035     }
00036 
00043     public static function callArray( $callback, $argsarams ) {
00044         wfDeprecated( __METHOD__, '1.22' );
00045 
00046         return call_user_func_array( $callback, $argsarams );
00047     }
00048 
00054     public static function newObj( $class, $args = array() ) {
00055         if ( !count( $args ) ) {
00056             return new $class;
00057         }
00058 
00059         $ref = new ReflectionClass( $class );
00060 
00061         return $ref->newInstanceArgs( $args );
00062     }
00063 }