/** * Includes script in a limited scope. * @param string file to include * @param array local variables * @return mixed the return value of the included file */ public static function load() { if (func_num_args() > 1) { self::$vars = func_get_arg(1); extract(self::$vars); } return include func_get_arg(0); }
/** * Includes script in a limited scope. * @param string file to include * @param array local variables * @return mixed the return value of the included file */ public static function load(/*$file, array $vars = NULL*/) { if (func_num_args() > 1) { self::$vars = func_get_arg(1); extract(self::$vars); } return include func_get_arg(0); }