com.caucho.quercus.lib
Class FunctionModule

java.lang.Object
  extended by com.caucho.quercus.module.AbstractQuercusModule
      extended by com.caucho.quercus.lib.FunctionModule
All Implemented Interfaces:
QuercusModule

public class FunctionModule
extends AbstractQuercusModule

PHP function routines.


Field Summary
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
FunctionModule()
           
 
Method Summary
static Value call_user_func_array(Env env, Callable function, Value arg)
          Calls a user function
static Value call_user_func(Env env, Callable function, Value[] args)
          Calls a user function
static Value create_function(Env env, java.lang.String args, java.lang.String code)
          Creates an anonymous function
static Value func_get_arg(Env env, int index)
          Returns the nth function argument.
static Value func_get_args(Env env)
          Returns the function arguments as an array.
static Value func_num_args(Env env)
          Returns the number of arguments to the function.
static boolean function_exists(Env env, java.lang.String name)
          Returns true if the function exists.
static Value get_defined_functions(Env env)
          Returns an array of the defined functions
static Value register_shutdown_function(Env env, Callable fun, Value[] args)
          Registers a shutdown function.
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions, getLoadedExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionModule

public FunctionModule()
Method Detail

call_user_func

public static Value call_user_func(Env env,
                                   Callable function,
                                   Value[] args)
Calls a user function


call_user_func_array

public static Value call_user_func_array(Env env,
                                         Callable function,
                                         Value arg)
Calls a user function


create_function

public static Value create_function(Env env,
                                    java.lang.String args,
                                    java.lang.String code)
Creates an anonymous function


func_get_arg

public static Value func_get_arg(Env env,
                                 int index)
Returns the nth function argument.


func_get_args

public static Value func_get_args(Env env)
Returns the function arguments as an array.


func_num_args

public static Value func_num_args(Env env)
Returns the number of arguments to the function.


function_exists

public static boolean function_exists(Env env,
                                      java.lang.String name)
Returns true if the function exists.

Parameters:
env - the PHP environment
name - the function name

get_defined_functions

public static Value get_defined_functions(Env env)
Returns an array of the defined functions


register_shutdown_function

public static Value register_shutdown_function(Env env,
                                               Callable fun,
                                               Value[] args)
Registers a shutdown function.