Class | Description |
---|---|
java_JavaType | implemented by JavaException and Java |
Java | The Java proxy class. |
java_exception | A decorator pattern which overrides all magic methods. |
JavaException | The java exception proxy |
Enters stream mode (asynchronuous protocol). The statements are sent to the back-end in one XML stream.
Use this protocol mode when you have a large number of set operations and you don't expect an exception. Any exception raised during stream mode is reported when java_end_document() is called.
Converts the java object obj into a PHP object. The second argument
must be [s]tring, [b]oolean, [i]nteger, [f]loat or [d]ouble, [a]rray, [n]ull or [o]bject (which does nothing).<p> This procedure is for compatibility with the pure PHP implementation, in the C implementation this procedure is called automatically for each type cast or when settype() is called.
Example:
Closes over the php environment and packages it up as a java
class. Example:
When a php instance is supplied as an argument, the environment will be used instead. When a string or key/value map is supplied as a second argument, the java procedure names are mapped to the php procedure names. Example:
When an array of java interfaces is supplied as a third argument, the environment must implement these interfaces. Example:
Returns the jsr223 script context handle.
Example which closes over the current environment and passes it back to java:
It is possible to access implicit web objects (the session, the application store etc.) from the context. Please see the JSR223 documentation for details. Example:
Ends stream mode. Fires a JavaException if any statement executed during stream mode raised an exception.
Returns the contents (public fields, public methods, public classes) of object as a string.
Example:
Tests if object is an instance of clazz.
Example:
Set the library path. Example:
The .jar files should be stored in /usr/share/java or extension_dir/lib one of its sub-directories or under the PHP include_path/LIBNAME/LIBNAME.jar. However, it is also possible to fetch .jar files from a remote server, for example:
Note that the classloader isolates the loaded libraries: When you call java_require("foo.jar"); java_require("bar.jar"), the classes from foo cannot see the classes loaded from bar. If you get a NoClassDefFound error saying that one of your classes cannot access the library you have loaded, you must reset the back-end to clear the loader cache and load your classes and the library in one java_require() call.
Only for internal use.
Returns the name of the back-end or null, if the back-end is not running. Example:
Return a session handle. When java_session() is called without arguments, the session is shared with java.
Example:
When java_get_session() is called with a session name, the session is not shared with java and no cookies are set. Example:
When java_get_session() is called with a second argument set to true, a new session is allocated, the old session is destroyed if necessary. Example:
The optional third argument specifies the default lifetime of the session, it defaults to \code session.gc_maxlifetime \endcode. The value 0 means that the session never times out.
Set the java file encoding, for example UTF-8 or ASCII. Needed
because php does not support unicode. All string to byte array conversions use this encoding. Example:
Evaluates the object and fetches its content, if possible.
A java array, Map or Collection object is returned as a php array. An array, Map or Collection proxy is returned as a java array, Map or Collection object, and a null proxy is returned as null. All values of java types for which a primitive php type exists are returned as php values. Everything else is returned unevaluated. Please make sure that the values do not not exceed php's memory limit. Example:
Documentation generated on Sun, 30 Sep 2007 10:33:26 +0200 by phpDocumentor 1.4.0a2