lithium\net\http\Service::_init PHP Method

_init() protected method

Initialize connection.
protected _init ( ) : void
return void
    protected function _init()
    {
        $config = array('classes' => $this->_classes) + $this->_config;
        try {
            $this->connection = Libraries::instance('socket', $config['socket'], $config);
        } catch (ClassNotFoundException $e) {
            $this->connection = null;
        }
        $this->_responseTypes += array('headers' => function ($response) {
            return $response->headers;
        }, 'body' => function ($response) {
            return $response->body();
        }, 'code' => function ($response) {
            return $response->status['code'];
        });
    }