|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.quercus.module.AbstractQuercusModule
com.caucho.quercus.lib.file.StreamModule
public class StreamModule
Handling the PHP Stream API
Field Summary | |
---|---|
static int |
PHP_STREAM_META_TOUCH
|
static int |
PSFS_ERR_FATAL
|
static int |
PSFS_FEED_ME
|
static int |
PSFS_PASS_ON
|
static int |
STREAM_CLIENT_ASYNC_CONNECT
|
static int |
STREAM_CLIENT_CONNECT
|
static int |
STREAM_CLIENT_PERSISTENT
|
static int |
STREAM_FILTER_ALL
|
static int |
STREAM_FILTER_READ
|
static int |
STREAM_FILTER_WRITE
|
static int |
STREAM_REPORT_ERRORS
|
static int |
STREAM_SERVER_BIND
|
static int |
STREAM_SERVER_LISTEN
|
static int |
STREAM_URL_STAT_LINK
|
static int |
STREAM_URL_STAT_QUIET
|
static int |
STREAM_USE_PATH
|
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule |
---|
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER |
Constructor Summary | |
---|---|
StreamModule()
|
Method Summary | |
---|---|
java.util.Map<StringValue,Value> |
getConstMap()
Adds the constant to the PHP engine's constant map. |
static Value |
stream_context_create(Env env,
ArrayValue options)
Creates a stream context. |
static Value |
stream_context_get_default(Env env,
ArrayValue options)
Returns the default stream context. |
static Value |
stream_context_get_options(Env env,
Value resource)
Returns the options from a stream context. |
static boolean |
stream_context_set_option(Env env,
Value resource,
StringValue wrapper,
StringValue option,
Value value)
Set an options for a stream context. |
static boolean |
stream_context_set_params(Env env,
Value resource,
ArrayValue value)
Sets parameters for the context |
static long |
stream_copy_to_stream(Env env,
BinaryInput in,
BinaryOutput out,
int length,
int offset)
Copies from an input stream to an output stream |
static Value |
stream_get_contents(Env env,
BinaryInput in,
long maxLen,
long offset)
Returns the rest of the file as a string |
static Value |
stream_get_line(Env env,
BinaryInput file,
long length)
Returns the next line |
static Value |
stream_get_meta_data(Env env,
BinaryStream stream)
Returns the metadata of this stream. |
static Value |
stream_get_transports(Env env)
Returns the available transports. |
static Value |
stream_get_wrappers(Env env)
Returns the available wrappers. |
static boolean |
stream_register_wrapper(Env env,
StringValue protocol,
java.lang.String className,
int flags)
|
static boolean |
stream_set_blocking(Env env,
Value stream,
int mode)
stream_set_blocking is stubbed since Quercus should wait for any stream (unless a non-web-server Quercus is developed.) |
static boolean |
stream_set_timeout(Env env,
Value stream,
int seconds,
int microseconds)
|
static int |
stream_set_write_buffer(Env env,
BinaryOutput stream,
int bufferSize)
Sets the write buffer. |
static SocketInputOutput |
stream_socket_client(Env env,
java.lang.String remoteSocket,
Value errorInt,
Value errorStr,
double timeout,
int flags,
StreamContextResource context)
Opens an Internet connection. |
static boolean |
stream_wrapper_register(Env env,
StringValue protocol,
java.lang.String className,
int flags)
Register a wrapper for a protocol. |
static boolean |
stream_wrapper_restore(Env env,
StringValue name)
Register a wrapper for a protocol. |
static boolean |
stream_wrapper_unregister(Env env,
StringValue name)
Register a wrapper for a protocol. |
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule |
---|
addConstant, addConstant, addConstant, getIniDefinitions, getLoadedExtensions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STREAM_FILTER_READ
public static final int STREAM_FILTER_WRITE
public static final int STREAM_FILTER_ALL
public static final int PSFS_PASS_ON
public static final int PSFS_FEED_ME
public static final int PSFS_ERR_FATAL
public static final int STREAM_USE_PATH
public static final int STREAM_REPORT_ERRORS
public static final int STREAM_CLIENT_ASYNC_CONNECT
public static final int STREAM_CLIENT_CONNECT
public static final int STREAM_CLIENT_PERSISTENT
public static final int STREAM_SERVER_BIND
public static final int STREAM_SERVER_LISTEN
public static final int STREAM_URL_STAT_LINK
public static final int STREAM_URL_STAT_QUIET
public static final int PHP_STREAM_META_TOUCH
Constructor Detail |
---|
public StreamModule()
Method Detail |
---|
public java.util.Map<StringValue,Value> getConstMap()
getConstMap
in interface QuercusModule
getConstMap
in class AbstractQuercusModule
public static Value stream_context_create(Env env, ArrayValue options)
public static Value stream_context_get_options(Env env, Value resource)
public static Value stream_context_get_default(Env env, ArrayValue options)
public static boolean stream_context_set_option(Env env, Value resource, StringValue wrapper, StringValue option, Value value)
public static boolean stream_context_set_params(Env env, Value resource, ArrayValue value)
public static long stream_copy_to_stream(Env env, BinaryInput in, BinaryOutput out, int length, int offset)
public static Value stream_get_contents(Env env, BinaryInput in, long maxLen, long offset)
filename
- the file's nameuseIncludePath
- if true, use the include pathcontext
- the resource contextpublic static Value stream_get_line(Env env, BinaryInput file, long length)
public static Value stream_get_meta_data(Env env, BinaryStream stream)
public static Value stream_get_transports(Env env)
public static Value stream_get_wrappers(Env env)
public static boolean stream_register_wrapper(Env env, StringValue protocol, java.lang.String className, int flags)
public static boolean stream_set_blocking(Env env, Value stream, int mode)
public static boolean stream_set_timeout(Env env, Value stream, int seconds, int microseconds)
public static int stream_set_write_buffer(Env env, BinaryOutput stream, int bufferSize)
public static SocketInputOutput stream_socket_client(Env env, java.lang.String remoteSocket, Value errorInt, Value errorStr, double timeout, int flags, StreamContextResource context)
public static boolean stream_wrapper_register(Env env, StringValue protocol, java.lang.String className, int flags)
public static boolean stream_wrapper_restore(Env env, StringValue name)
public static boolean stream_wrapper_unregister(Env env, StringValue name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |