protected function loadClient(): void
    {
        if (self::$client === null) {
            $options = $this->options;

            if (!isset($options['servlet_address'])) {
                throw new Exception\InvalidArgumentException(__METHOD__.' Missing required parameter servlet_address');
            }

            $connection = static::parseServletUrl($options['servlet_address']);

            $params = new ArrayObject([
                Client::PARAM_JAVA_HOSTS => $connection['servlet_host'],
                Client::PARAM_JAVA_SERVLET => $connection['servlet_uri'],
                Client::PARAM_JAVA_AUTH_USER => $connection['auth_user'],
                Client::PARAM_JAVA_AUTH_PASSWORD => $connection['auth_password'],
                Client::PARAM_JAVA_DISABLE_AUTOLOAD => $options['java_disable_autoload'],
                Client::PARAM_JAVA_PREFER_VALUES => $options['java_prefer_values'],
                Client::PARAM_JAVA_SEND_SIZE => $options['java_send_size'],
                Client::PARAM_JAVA_RECV_SIZE => $options['java_recv_size'],
                Client::PARAM_JAVA_LOG_LEVEL => $options['java_log_level'],
                Client::PARAM_XML_PARSER_FORCE_SIMPLE_PARSER => $options['force_simple_xml_parser'],
                Client::PARAM_USE_PERSISTENT_CONNECTION => $options['use_persistent_connection']
            ]);

            self::$client = new Client($params, $this->logger);

            // Added in order to work with custom exceptions
            self::getClient()->throwExceptionProxyFactory = new Proxy\DefaultThrowExceptionProxyFactory(self::$client, $this->logger);

            $this->bootstrap();
        }
    }
protected function loadClient(): void
    {
        if (self::$client === null) {
            $options = $this->options;

            if (!isset($options['servlet_address'])) {
                throw new Exception\InvalidArgumentException(__METHOD__.' Missing required parameter servlet_address');
            }

            $connection = static::parseServletUrl($options['servlet_address']);

            $params = new ArrayObject([
                Client::PARAM_JAVA_HOSTS => $connection['servlet_host'],
                Client::PARAM_JAVA_SERVLET => $connection['servlet_uri'],
                Client::PARAM_JAVA_AUTH_USER => $connection['auth_user'],
                Client::PARAM_JAVA_AUTH_PASSWORD => $connection['auth_password'],
                Client::PARAM_JAVA_DISABLE_AUTOLOAD => $options['java_disable_autoload'],
                Client::PARAM_JAVA_PREFER_VALUES => $options['java_prefer_values'],
                Client::PARAM_JAVA_SEND_SIZE => $options['java_send_size'],
                Client::PARAM_JAVA_RECV_SIZE => $options['java_recv_size'],
                Client::PARAM_JAVA_LOG_LEVEL => $options['java_log_level'],
                Client::PARAM_XML_PARSER_FORCE_SIMPLE_PARSER => $options['force_simple_xml_parser'],
                Client::PARAM_USE_PERSISTENT_CONNECTION => $options['use_persistent_connection']
            ]);

            self::$client = new Client($params, $this->logger);

            // Added in order to work with custom exceptions
            self::getClient()->throwExceptionProxyFactory = new Proxy\DefaultThrowExceptionProxyFactory(self::$client, $this->logger);

            $this->bootstrap();
        }
    }
protected function loadClient ( ) : void { if ( self :: $ client === null ) { $ options = $ this -> options ; if ( ! isset ( $ options [ 'servlet_address' ] ) ) { throw new Exception \ InvalidArgumentException ( __METHOD__ . ' Missing required parameter servlet_address' ) ; } $ connection = static :: parseServletUrl ( $ options [ 'servlet_address' ] ) ; $ params = new ArrayObject ( [ Client :: PARAM_JAVA_HOSTS => $ connection [ 'servlet_host' ] , Client :: PARAM_JAVA_SERVLET => $ connection [ 'servlet_uri' ] , Client :: PARAM_JAVA_AUTH_USER => $ connection [ 'auth_user' ] , Client :: PARAM_JAVA_AUTH_PASSWORD => $ connection [ 'auth_password' ] , Client :: PARAM_JAVA_DISABLE_AUTOLOAD => $ options [ 'java_disable_autoload' ] , Client :: PARAM_JAVA_PREFER_VALUES => $ options [ 'java_prefer_values' ] , Client :: PARAM_JAVA_SEND_SIZE => $ options [ 'java_send_size' ] , Client :: PARAM_JAVA_RECV_SIZE => $ options [ 'java_recv_size' ] , Client :: PARAM_JAVA_LOG_LEVEL => $ options [ 'java_log_level' ] , Client :: PARAM_XML_PARSER_FORCE_SIMPLE_PARSER => $ options [ 'force_simple_xml_parser' ] , Client :: PARAM_USE_PERSISTENT_CONNECTION => $ options [ 'use_persistent_connection' ] ] ) ; self :: $ client = new Client ( $ params , $ this -> logger ) ; // Added in order to work with custom exceptions self :: getClient ( ) -> throwExceptionProxyFactory = new Proxy \ DefaultThrowExceptionProxyFactory ( self :: $ client , $ this -> logger ) ; $ this -> bootstrap ( ) ; } }
Load pjb client with options.

@throws Exception\InvalidArgumentException
@throws Exception\ConnectionException
Load pjb client with options .