lithium\analysis\logger\adapter\Growl::_connection PHP Method

_connection() protected method

Creates a connection to the Growl server using the protocol, host and port configurations specified in the constructor.
protected _connection ( ) : resource
return resource Returns a connection resource created by `fsockopen()`.
    protected function _connection()
    {
        if ($this->_connection) {
            return $this->_connection;
        }
        $host = "{$this->_config['protocol']}://{$this->_config['host']}";
        if ($this->_connection = fsockopen($host, $this->_config['port'], $message, $code)) {
            return $this->_connection;
        }
        throw new NetworkException("Growl connection failed: (`{$code}`) `{$message}`.");
    }