2 Star 0 Fork 1

XiaoSK/DB2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ResponseError.php 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
XiaoSK 提交于 2014-05-22 02:44 . Add Redis session support
<?php
/*
* This file is part of the Predis package.
*
* (c) Daniele Alessandri <suppakilla@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Predis;
/**
* Represents an error returned by Redis (-ERR replies) during the execution
* of a command on the server.
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
class ResponseError implements ResponseErrorInterface
{
private $message;
/**
* @param string $message Error message returned by Redis
*/
public function __construct($message)
{
$this->message = $message;
}
/**
* {@inheritdoc}
*/
public function getMessage()
{
return $this->message;
}
/**
* {@inheritdoc}
*/
public function getErrorType()
{
list($errorType, ) = explode(' ', $this->getMessage(), 2);
return $errorType;
}
/**
* Converts the object to its string representation.
*
* @return string
*/
public function __toString()
{
return $this->getMessage();
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/xskonline/DB2.git
git@gitee.com:xskonline/DB2.git
xskonline
DB2
DB2
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385