Overview

Packages

  • None
  • pdb

Classes

  • Java
  • java_AbstractJava
  • java_ApplyArg
  • java_Arg
  • java_ArrayProxy
  • java_ArrayProxyFactory
  • java_CacheEntry
  • java_ChunkedSocketChannel
  • java_class
  • java_Client
  • java_CompositeArg
  • java_EmptyChannel
  • java_ExceptionProxy
  • java_ExceptionProxyFactory
  • java_GlobalRef
  • java_HttpTunnelHandler
  • java_InternalJava
  • java_IteratorProxy
  • java_IteratorProxyFactory
  • java_JavaProxy
  • java_JavaProxyProxy
  • java_NativeParser
  • java_objectIterator
  • java_Parser
  • java_ParserString
  • java_ParserTag
  • java_Protocol
  • java_ProxyFactory
  • java_SimpleFactory
  • java_SimpleHttpHandler
  • java_SimpleHttpTunnelHandler
  • java_SimpleParser
  • java_SocketChannel
  • java_SocketChannelP
  • java_SocketHandler
  • java_ThrowExceptionProxyFactory
  • JavaClass

Interfaces

  • java_JavaType

Exceptions

  • java_ConnectException
  • java_exception
  • java_IllegalArgumentException
  • java_IllegalStateException
  • java_InternalException
  • java_IOException
  • java_JavaException
  • java_RuntimeException
  • JavaException

Functions

  • __javaproxy_Client_getClient
  • Java
  • java_autoload
  • java_autoload_function
  • java_autoload_function5
  • java_begin_document
  • java_call_with_continuation
  • java_cast
  • java_cast_internal
  • java_checkCliSapi
  • java_closure
  • java_closure_array
  • java_context
  • java_defineHostFromInitialQuery
  • java_end_document
  • java_eval
  • java_get_base
  • java_get_closure
  • java_get_context
  • java_get_lifetime
  • java_get_server_name
  • java_get_session
  • java_get_values
  • java_getCompatibilityOption
  • java_getHeader
  • java_inspect
  • java_inspect_internal
  • java_instanceof
  • java_instanceof_internal
  • java_invoke
  • java_is_false
  • java_is_null
  • java_is_true
  • java_isfalse
  • java_isnull
  • java_istrue
  • java_last_exception_clear
  • java_last_exception_get
  • java_require
  • java_reset
  • java_server_name
  • java_session
  • java_session_array
  • java_set_encoding
  • java_set_file_encoding
  • java_shutdown
  • java_truncate
  • java_unwrap
  • java_values
  • java_values_internal
  • java_virtual
  • java_wrap
  • Overview
  • Package
  • Function
  • Todo
  • Deprecated

Function java_closure

Wraps a PHP environment.

Closes over the php environment and packages it up as a java class. Use java_closure() to convert a PHP object into an equivalent Java object.

Example:

function toString() {return "helloWorld";};
$object = java_closure();
echo "Java says that PHP says: $object\n";

When a php instance is supplied as an argument, the instance 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:

function hello() {return "hello";};
echo (string)java_closure(null, "hello");

When an array of java interfaces is supplied as a third argument, the environment must implement these interfaces. Example:

class Listener {
  function actionPerformed($actionEvent) {
      ...
    }
}
function getListener() {
    return java_closure(new Listener(), null, array(new Java("java.awt.event.ActionListener")));
}
License: GPL
Author: Jost Boekemeier
See: java_values()
Located at JavaProxy.inc
VM Bridge API documentation generated by ApiGen