com.caucho.quercus.lib
Class ClassesModule

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

public class ClassesModule
extends AbstractQuercusModule

Quercus class information


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
ClassesModule()
           
 
Method Summary
static Value call_user_method_array(Env env, StringValue methodName, Value obj, ArrayValue params)
           
static Value call_user_method(Env env, StringValue name, Value obj, Value[] args)
          Calls an object method.
 boolean class_exists(Env env, java.lang.String className, boolean useAutoload)
          returns true if the class exists.
 java.lang.String get_called_class(Env env)
           
static Value get_class_methods(Env env, Value cls)
          Returns an array of method names
static Value get_class_vars(Env env, Value obj)
          Returns an array of member names and values
 Value get_class(Env env, Value value)
          Returns the object's class name
static Value get_declared_classes(Env env)
          Returns the declared classes
static Value get_object_vars(Env env, Value obj)
          Returns the object's variables
 Value get_parent_class(Env env, Value value)
          Returns the object's class name
 boolean interface_exists(Env env, java.lang.String interfaceName, boolean useAutoload)
          Returns true if the class exists.
static boolean is_a(Value value, java.lang.String name)
          Returns true if the object implements the given class.
static boolean is_object(Value value)
          Returns true if the argument is an object.
static boolean is_subclass_of(Env env, Value value, java.lang.String name)
          Returns true if the object implements the given class.
static boolean method_exists(Env env, Value obj, StringValue methodName)
          Returns true if the named method exists on the object.
static Value property_exists(Env env, Value obj, StringValue name)
          Returns true if the named property exists on the object.
 
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

ClassesModule

public ClassesModule()
Method Detail

call_user_method

public static Value call_user_method(Env env,
                                     StringValue name,
                                     Value obj,
                                     Value[] args)
Calls an object method.


call_user_method_array

public static Value call_user_method_array(Env env,
                                           StringValue methodName,
                                           Value obj,
                                           ArrayValue params)

class_exists

public boolean class_exists(Env env,
                            java.lang.String className,
                            boolean useAutoload)
returns true if the class exists.


get_class

public Value get_class(Env env,
                       Value value)
Returns the object's class name


get_called_class

public java.lang.String get_called_class(Env env)

get_class_methods

public static Value get_class_methods(Env env,
                                      Value cls)
Returns an array of method names

Parameters:
clss - the name of the class, or an instance of a class
Returns:
an array of method names

get_class_vars

public static Value get_class_vars(Env env,
                                   Value obj)
Returns an array of member names and values

Parameters:
clss - the name of the class, or an instance of a class
Returns:
an array of member names and values

get_declared_classes

public static Value get_declared_classes(Env env)
Returns the declared classes


get_object_vars

public static Value get_object_vars(Env env,
                                    Value obj)
Returns the object's variables


get_parent_class

public Value get_parent_class(Env env,
                              Value value)
Returns the object's class name


interface_exists

public boolean interface_exists(Env env,
                                java.lang.String interfaceName,
                                boolean useAutoload)
Returns true if the class exists.


is_a

public static boolean is_a(Value value,
                           java.lang.String name)
Returns true if the object implements the given class.


is_object

public static boolean is_object(Value value)
Returns true if the argument is an object.


is_subclass_of

public static boolean is_subclass_of(Env env,
                                     Value value,
                                     java.lang.String name)
Returns true if the object implements the given class.


method_exists

public static boolean method_exists(Env env,
                                    Value obj,
                                    StringValue methodName)
Returns true if the named method exists on the object.

Parameters:
obj - the object to test
methodName - the name of the method

property_exists

public static Value property_exists(Env env,
                                    Value obj,
                                    StringValue name)
Returns true if the named property exists on the object.