com.caucho.quercus.lib
Class MiscModule

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

public class MiscModule
extends AbstractQuercusModule

PHP misc functiomn.


Field Summary
static int CONNECTION_ABORTED
           
static int CONNECTION_NORMAL
           
static int CONNECTION_TIMEOUT
           
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
MiscModule()
           
 
Method Summary
static int connection_aborted(Env env)
          Return true on a client disconnect
static int connection_status(Env env)
          Returns the status
static Value dump_stack(Env env)
          Dumps the stack.
static StringValue escapeshellarg(Env env, StringValue arg)
          Escapes characters in a string.
static java.lang.String escapeshellcmd(java.lang.String command)
          Escapes characters in a string.
 Value eval(Env env, java.lang.String code)
          Comples and evaluates an expression.
static java.lang.String exec(Env env, java.lang.String command, Value output, Value result)
          Execute a system command.
static Value get_browser(Env env, java.lang.String user_agent, boolean return_array)
          Returns an array detailing what the browser is capable of.
static int ignore_user_abort(boolean set)
          Returns the disconnect ignore setting
 Value pack(Env env, java.lang.String format, Value[] args)
          packs the format into a binary.
static void passthru(Env env, java.lang.String command, Value result)
          Execute a system command.
static int proc_close(Env env, ProcOpenResource stream)
           
static Value proc_get_status(Env env, ProcOpenResource stream)
           
static ProcOpenResource proc_open(Env env, java.lang.String command, ArrayValue descriptorArray, Value pipes, Path pwd, ArrayValue envArray, ArrayValue options)
           
static boolean proc_terminate(Env env, ProcOpenResource stream)
           
 Value resin_debug(java.lang.String code)
          Logs the expression.
 Value resin_thread_dump()
          Dumps the Java stack to standard out.
static Value shell_exec(Env env, java.lang.String command)
          Execute a system command.
static long sleep(long seconds)
          Sleep for a number of seconds.
static java.lang.String system(Env env, java.lang.String command, Value result)
          Execute a system command.
 java.lang.String uniqid(java.lang.String prefix, boolean moreEntropy)
          Returns a unique id.
 Value unpack(Env env, java.lang.String format, StringValue s)
          packs the format into a binary.
static Value usleep(long microseconds)
          Sleep for a number of microseconds.
 
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
 

Field Detail

CONNECTION_NORMAL

public static final int CONNECTION_NORMAL
See Also:
Constant Field Values

CONNECTION_ABORTED

public static final int CONNECTION_ABORTED
See Also:
Constant Field Values

CONNECTION_TIMEOUT

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

MiscModule

public MiscModule()
Method Detail

connection_aborted

public static int connection_aborted(Env env)
Return true on a client disconnect


connection_status

public static int connection_status(Env env)
Returns the status


escapeshellcmd

public static java.lang.String escapeshellcmd(java.lang.String command)
Escapes characters in a string.


escapeshellarg

public static StringValue escapeshellarg(Env env,
                                         StringValue arg)
Escapes characters in a string.


eval

public Value eval(Env env,
                  java.lang.String code)
Comples and evaluates an expression.


exec

public static java.lang.String exec(Env env,
                                    java.lang.String command,
                                    Value output,
                                    Value result)
Execute a system command.


get_browser

public static Value get_browser(Env env,
                                java.lang.String user_agent,
                                boolean return_array)
Returns an array detailing what the browser is capable of. A general browscap.ini file can be used.

Parameters:
env -
user_agent -
return_array -

pack

public Value pack(Env env,
                  java.lang.String format,
                  Value[] args)
packs the format into a binary.


unpack

public Value unpack(Env env,
                    java.lang.String format,
                    StringValue s)
packs the format into a binary.


resin_debug

public Value resin_debug(java.lang.String code)
Logs the expression.


resin_thread_dump

public Value resin_thread_dump()
Dumps the Java stack to standard out.


dump_stack

public static Value dump_stack(Env env)
Dumps the stack.


shell_exec

public static Value shell_exec(Env env,
                               java.lang.String command)
Execute a system command.


passthru

public static void passthru(Env env,
                            java.lang.String command,
                            Value result)
Execute a system command.


proc_open

public static ProcOpenResource proc_open(Env env,
                                         java.lang.String command,
                                         ArrayValue descriptorArray,
                                         Value pipes,
                                         Path pwd,
                                         ArrayValue envArray,
                                         ArrayValue options)

proc_close

public static int proc_close(Env env,
                             ProcOpenResource stream)

proc_terminate

public static boolean proc_terminate(Env env,
                                     ProcOpenResource stream)

proc_get_status

public static Value proc_get_status(Env env,
                                    ProcOpenResource stream)

ignore_user_abort

public static int ignore_user_abort(boolean set)
Returns the disconnect ignore setting


uniqid

public java.lang.String uniqid(java.lang.String prefix,
                               boolean moreEntropy)
Returns a unique id.


usleep

public static Value usleep(long microseconds)
Sleep for a number of microseconds.


sleep

public static long sleep(long seconds)
Sleep for a number of seconds.


system

public static java.lang.String system(Env env,
                                      java.lang.String command,
                                      Value result)
Execute a system command.