protected function checkResponse($buffer)
    {
        // Check for HARD errors. Not an unsuccessful response from command -> here = real errors
        if (preg_match('/' . self::ERROR . '(.*)\R/mu', $buffer, $error) > 0) {
            // ERROR\r\n
            $result = self::MEMCACHED_FAILURE;

        } elseif (preg_match('/' . self::ERROR_CLIENT . '(.*)\R/mu', $buffer, $error) > 0) {
            // CLIENT_ERROR\r\n
            $result = self::RESPONSE_CLIENT_ERROR;

        } elseif (preg_match('/' . self::ERROR_SERVER . '(.*)\R/mu', $buffer, $error) > 0) {
            // SERVER_ERROR\r\n
            $result = self::ERROR_SERVER;

        } else {
            $result = self::MEMCACHED_SUCCESS;
        }

        // Get and return result by response ;)
        return $this->setLastResponse($result);
    }
protected function checkResponse($buffer)
    {
        // Check for HARD errors. Not an unsuccessful response from command -> here = real errors
        if (preg_match('/' . self::ERROR . '(.*)\R/mu', $buffer, $error) > 0) {
            // ERROR\r\n
            $result = self::MEMCACHED_FAILURE;

        } elseif (preg_match('/' . self::ERROR_CLIENT . '(.*)\R/mu', $buffer, $error) > 0) {
            // CLIENT_ERROR\r\n
            $result = self::RESPONSE_CLIENT_ERROR;

        } elseif (preg_match('/' . self::ERROR_SERVER . '(.*)\R/mu', $buffer, $error) > 0) {
            // SERVER_ERROR\r\n
            $result = self::ERROR_SERVER;

        } else {
            $result = self::MEMCACHED_SUCCESS;
        }

        // Get and return result by response ;)
        return $this->setLastResponse($result);
    }
protected function checkResponse ( $ buffer ) { // Check for HARD errors. Not an unsuccessful response from command -> here = real errors if ( preg_match ( '/' . self :: ERROR . '(.*)\R/mu' , $ buffer , $ error ) > 0 ) { // ERROR\r\n $ result = self :: MEMCACHED_FAILURE ; } elseif ( preg_match ( '/' . self :: ERROR_CLIENT . '(.*)\R/mu' , $ buffer , $ error ) > 0 ) { // CLIENT_ERROR\r\n $ result = self :: RESPONSE_CLIENT_ERROR ; } elseif ( preg_match ( '/' . self :: ERROR_SERVER . '(.*)\R/mu' , $ buffer , $ error ) > 0 ) { // SERVER_ERROR\r\n $ result = self :: ERROR_SERVER ; } else { $ result = self :: MEMCACHED_SUCCESS ; } // Get and return result by response ;) return $ this -> setLastResponse ( $ result ) ; }
Checks if a response contains some sort of hard errors or if it is parseable by the further process.

@param string $buffer The buffer to check

@author Benjamin Carl <opensource@clickalicious.de>
@return bool TRUE on success, otherwise FALSE if response contains ERROR(s)
@access protected
Checks if a response contains some sort of hard errors or if it is parseable by the further process .