com.caucho.quercus.lib
Class OptionsModule

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

public class OptionsModule
extends AbstractQuercusModule

PHP options


Field Summary
static int ASSERT_ACTIVE
           
static int ASSERT_BAIL
           
static int ASSERT_CALLBACK
           
static int ASSERT_QUIET_EVAL
           
static int ASSERT_WARNING
           
static int CREDITS_ALL
           
static int CREDITS_DOCS
           
static int CREDITS_FULLPAGE
           
static int CREDITS_GENERAL
           
static int CREDITS_GROUP
           
static int CREDITS_MODULES
           
static int CREDITS_QA
           
static int CREDITS_SAPI
           
static int INFO_ALL
           
static int INFO_CONFIGURATION
           
static int INFO_CREDITS
           
static int INFO_ENVIRONMENT
           
static int INFO_GENERAL
           
static int INFO_LICENSE
           
static int INFO_MODULES
           
static int INFO_VARIABLES
           
static java.lang.String PHP_EOL
           
static java.lang.String PHP_OS
           
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
OptionsModule()
           
 
Method Summary
static Value assert_options(Env env, int code, Value value)
          Checks the assertion
static boolean dl(Env env, java.lang.String dl)
          Stubs the dl.
static boolean extension_loaded(Env env, java.lang.String ext)
          Returns true if the given extension is loaded
static void gc_disable()
           
static void gc_enable()
           
static boolean gc_enabled()
          JVM takes care of circular reference collection.
static Value get_cfg_var(Env env, java.lang.String name)
          Returns the configuration value of a configuration.
static java.lang.String get_current_user(Env env)
          Returns the owner of the current script.
static Value get_defined_constants(Env env)
          Returns the constants as an array
static Value get_extension_funcs(Env env, java.lang.String name)
          Returns extension function with a given name.
static Value get_include_path(Env env)
          Returns the include path
static ArrayValue get_included_files(Env env)
          Returns an array of all the included path.
static Value get_loaded_extensions(Env env)
          Returns true if the given extension is loaded
static LongValue get_magic_quotes_gpc(Env env)
          Gets the magic quotes value.
static Value get_magic_quotes_runtime(Env env)
          Gets the magic quotes runtime value.
static ArrayValue get_required_files(Env env)
          Returns an array of all the included path.
static Value getenv(Env env, StringValue key)
          Gets an environment value.
 IniDefinitions getIniDefinitions()
          Returns the default php.ini values.
static Value getlastmod(Env env)
          Returns the gid for the script path.
static Value getmygid(Env env)
          Returns the gid for the script path.
static Value getmyinode(Env env)
          Returns the inode for the script path.
static long getmypid(Env env)
          Returns the thread for the script.
static Value getmyuid(Env env)
          Returns the uid for the script path.
static Value getrusage(Env env, int who)
          Stub value for getrusage.
static Value ini_alter(Env env, java.lang.String varName, StringValue value)
          Sets an initialization value.
static Value ini_get_all(Env env, java.lang.String extension)
          Returns all initialization values.
static StringValue ini_get(Env env, java.lang.String varName)
          Returns an initialization value.
static Value ini_restore(Env env, java.lang.String name)
          Restore the initial configuration value
static StringValue ini_set(Env env, java.lang.String varName, StringValue value)
          Sets an initialization value.
static Value magic_quotes_runtime(Env env)
          Gets the magic quotes value.
static Value memory_get_peak_usage(Env env, boolean real)
          Stub value for memory get usage.
static Value memory_get_usage(Env env, boolean real)
          Stub value for memory get usage.
static java.lang.String php_sapi_name(Env env)
          Returns the sapi type.
static java.lang.String php_uname(java.lang.String mode)
          Returns system information
static void phpinfo(Env env, int what)
           
static StringValue phpversion(Env env, StringValue module)
          Returns the quercus version.
static boolean putenv(Env env, StringValue settings)
          Sets an environment name/value pair.
static Value q_assert(Env env, java.lang.String code)
          Checks the assertion
static Value restore_include_path(Env env)
          Sets the include path
static java.lang.String set_include_path(Env env, java.lang.String includePath)
          Sets the include path
static Value set_magic_quotes_runtime(Env env, Value value)
          Sets the magic quotes value.
static Value set_time_limit(Env env, long seconds)
          Sets the time limit and resets the timeout.
static java.lang.String sys_get_temp_dir(Env env)
           
static Value version_compare(Env env, StringValue version1, StringValue version2, java.lang.String op)
          Compares versions
static java.lang.String zend_version()
           
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getConstMap, getLoadedExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PHP_OS

public static final java.lang.String PHP_OS

PHP_EOL

public static final java.lang.String PHP_EOL

ASSERT_ACTIVE

public static final int ASSERT_ACTIVE
See Also:
Constant Field Values

ASSERT_CALLBACK

public static final int ASSERT_CALLBACK
See Also:
Constant Field Values

ASSERT_BAIL

public static final int ASSERT_BAIL
See Also:
Constant Field Values

ASSERT_WARNING

public static final int ASSERT_WARNING
See Also:
Constant Field Values

ASSERT_QUIET_EVAL

public static final int ASSERT_QUIET_EVAL
See Also:
Constant Field Values

CREDITS_GROUP

public static final int CREDITS_GROUP
See Also:
Constant Field Values

CREDITS_GENERAL

public static final int CREDITS_GENERAL
See Also:
Constant Field Values

CREDITS_SAPI

public static final int CREDITS_SAPI
See Also:
Constant Field Values

CREDITS_MODULES

public static final int CREDITS_MODULES
See Also:
Constant Field Values

CREDITS_DOCS

public static final int CREDITS_DOCS
See Also:
Constant Field Values

CREDITS_FULLPAGE

public static final int CREDITS_FULLPAGE
See Also:
Constant Field Values

CREDITS_QA

public static final int CREDITS_QA
See Also:
Constant Field Values

CREDITS_ALL

public static final int CREDITS_ALL
See Also:
Constant Field Values

INFO_GENERAL

public static final int INFO_GENERAL
See Also:
Constant Field Values

INFO_CREDITS

public static final int INFO_CREDITS
See Also:
Constant Field Values

INFO_CONFIGURATION

public static final int INFO_CONFIGURATION
See Also:
Constant Field Values

INFO_MODULES

public static final int INFO_MODULES
See Also:
Constant Field Values

INFO_ENVIRONMENT

public static final int INFO_ENVIRONMENT
See Also:
Constant Field Values

INFO_VARIABLES

public static final int INFO_VARIABLES
See Also:
Constant Field Values

INFO_LICENSE

public static final int INFO_LICENSE
See Also:
Constant Field Values

INFO_ALL

public static final int INFO_ALL
See Also:
Constant Field Values
Constructor Detail

OptionsModule

public OptionsModule()
Method Detail

getIniDefinitions

public IniDefinitions getIniDefinitions()
Returns the default php.ini values.

Specified by:
getIniDefinitions in interface QuercusModule
Overrides:
getIniDefinitions in class AbstractQuercusModule

q_assert

public static Value q_assert(Env env,
                             java.lang.String code)
Checks the assertion


assert_options

public static Value assert_options(Env env,
                                   int code,
                                   Value value)
Checks the assertion


dl

public static boolean dl(Env env,
                         java.lang.String dl)
Stubs the dl.


extension_loaded

public static boolean extension_loaded(Env env,
                                       java.lang.String ext)
Returns true if the given extension is loaded


get_cfg_var

public static Value get_cfg_var(Env env,
                                java.lang.String name)
Returns the configuration value of a configuration.


get_current_user

public static java.lang.String get_current_user(Env env)
Returns the owner of the current script.


get_defined_constants

public static Value get_defined_constants(Env env)
Returns the constants as an array


get_extension_funcs

public static Value get_extension_funcs(Env env,
                                        java.lang.String name)
Returns extension function with a given name.


get_include_path

public static Value get_include_path(Env env)
Returns the include path


get_included_files

public static ArrayValue get_included_files(Env env)
Returns an array of all the included path.


get_loaded_extensions

public static Value get_loaded_extensions(Env env)
Returns true if the given extension is loaded


get_magic_quotes_gpc

public static LongValue get_magic_quotes_gpc(Env env)
Gets the magic quotes value.


get_magic_quotes_runtime

public static Value get_magic_quotes_runtime(Env env)
Gets the magic quotes runtime value.


get_required_files

public static ArrayValue get_required_files(Env env)
Returns an array of all the included path.


getenv

public static Value getenv(Env env,
                           StringValue key)
Gets an environment value.


getlastmod

public static Value getlastmod(Env env)
Returns the gid for the script path.


getmygid

public static Value getmygid(Env env)
Returns the gid for the script path.


getmyinode

public static Value getmyinode(Env env)
Returns the inode for the script path.


getmyuid

public static Value getmyuid(Env env)
Returns the uid for the script path.


getmypid

public static long getmypid(Env env)
Returns the thread for the script.


getrusage

public static Value getrusage(Env env,
                              int who)
Stub value for getrusage.


ini_alter

public static Value ini_alter(Env env,
                              java.lang.String varName,
                              StringValue value)
Sets an initialization value.


ini_get

public static StringValue ini_get(Env env,
                                  java.lang.String varName)
Returns an initialization value.


ini_get_all

public static Value ini_get_all(Env env,
                                java.lang.String extension)
Returns all initialization values. XXX: access levels dependent on PHP_INI, PHP_INI_PERDIR, PHP_INI_SYSTEM.

Parameters:
extension - assumes ini values are prefixed by extension names.

ini_restore

public static Value ini_restore(Env env,
                                java.lang.String name)
Restore the initial configuration value


ini_set

public static StringValue ini_set(Env env,
                                  java.lang.String varName,
                                  StringValue value)
Sets an initialization value.


magic_quotes_runtime

public static Value magic_quotes_runtime(Env env)
Gets the magic quotes value.


memory_get_peak_usage

public static Value memory_get_peak_usage(Env env,
                                          boolean real)
Stub value for memory get usage.


memory_get_usage

public static Value memory_get_usage(Env env,
                                     boolean real)
Stub value for memory get usage.


php_sapi_name

public static java.lang.String php_sapi_name(Env env)
Returns the sapi type.


php_uname

public static java.lang.String php_uname(java.lang.String mode)
Returns system information


phpinfo

public static void phpinfo(Env env,
                           int what)

phpversion

public static StringValue phpversion(Env env,
                                     StringValue module)
Returns the quercus version.


putenv

public static boolean putenv(Env env,
                             StringValue settings)
Sets an environment name/value pair.


restore_include_path

public static Value restore_include_path(Env env)
Sets the include path


set_include_path

public static java.lang.String set_include_path(Env env,
                                                java.lang.String includePath)
Sets the include path


set_magic_quotes_runtime

public static Value set_magic_quotes_runtime(Env env,
                                             Value value)
Sets the magic quotes value.


set_time_limit

public static Value set_time_limit(Env env,
                                   long seconds)
Sets the time limit and resets the timeout.


sys_get_temp_dir

public static java.lang.String sys_get_temp_dir(Env env)

version_compare

public static Value version_compare(Env env,
                                    StringValue version1,
                                    StringValue version2,
                                    java.lang.String op)
Compares versions


zend_version

public static java.lang.String zend_version()

gc_enabled

public static boolean gc_enabled()
JVM takes care of circular reference collection.


gc_enable

public static void gc_enable()

gc_disable

public static void gc_disable()