src/Client.php
public function configure(array $options = array())
    {
        if (isset($options['host'])) {
            $this->host = $options['host'];
        }
        if (isset($options['port'])) {
            if (!is_numeric($options['port']) || is_float($options['port']) || $options['port'] < 0 || $options['port'] > 65535) {
                throw new ConfigurationException($this, 'Port is out of range');
            }
            $this->port = $options['port'];
        }

        if (isset($options['namespace'])) {
            $this->namespace = $options['namespace'];
        }

        if (isset($options['timeout'])) {
            $this->timeout = $options['timeout'];
        }

        if (isset($options['throwConnectionExceptions'])) {
            $this->throwConnectionExceptions = $options['throwConnectionExceptions'];
        }

        if (isset($options['tags'])) {
            $this->tags = $options['tags'];
        }

        return $this;
    }
public function configure(array $options = array())
    {
        if (isset($options['host'])) {
            $this->host = $options['host'];
        }
        if (isset($options['port'])) {
            if (!is_numeric($options['port']) || is_float($options['port']) || $options['port'] < 0 || $options['port'] > 65535) {
                throw new ConfigurationException($this, 'Port is out of range');
            }
            $this->port = $options['port'];
        }

        if (isset($options['namespace'])) {
            $this->namespace = $options['namespace'];
        }

        if (isset($options['timeout'])) {
            $this->timeout = $options['timeout'];
        }

        if (isset($options['throwConnectionExceptions'])) {
            $this->throwConnectionExceptions = $options['throwConnectionExceptions'];
        }

        if (isset($options['tags'])) {
            $this->tags = $options['tags'];
        }

        return $this;
    }
public function configure ( array $ options = array ( ) ) { if ( isset ( $ options [ 'host' ] ) ) { $ this -> host = $ options [ 'host' ] ; } if ( isset ( $ options [ 'port' ] ) ) { if ( ! is_numeric ( $ options [ 'port' ] ) || is_float ( $ options [ 'port' ] ) || $ options [ 'port' ] < 0 || $ options [ 'port' ] > 65535 ) { throw new ConfigurationException ( $ this , 'Port is out of range' ) ; } $ this -> port = $ options [ 'port' ] ; } if ( isset ( $ options [ 'namespace' ] ) ) { $ this -> namespace = $ options [ 'namespace' ] ; } if ( isset ( $ options [ 'timeout' ] ) ) { $ this -> timeout = $ options [ 'timeout' ] ; } if ( isset ( $ options [ 'throwConnectionExceptions' ] ) ) { $ this -> throwConnectionExceptions = $ options [ 'throwConnectionExceptions' ] ; } if ( isset ( $ options [ 'tags' ] ) ) { $ this -> tags = $ options [ 'tags' ] ; } return $ this ; }
Initialize Connection Details
@param array $options Configuration options
@return Client This instance
@throws ConfigurationException If port is invalid
Initialize Connection Details