本文整理汇总了PHP中PEAR_Error::PEAR_Error方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_Error::PEAR_Error方法的具体用法?PHP PEAR_Error::PEAR_Error怎么用?PHP PEAR_Error::PEAR_Error使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR_Error
的用法示例。
在下文中一共展示了PEAR_Error::PEAR_Error方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Constructor.
*
* @param string $faultstring Message string for fault.
* @param mixed $faultcode The faultcode.
* @param mixed $faultactor
* @param mixed $detail @see PEAR_Error
* @param array $mode @see PEAR_Error
* @param array $options @see PEAR_Error
*/
function SOAP_Fault($faultstring = 'unknown error', $faultcode = 'Client', $faultactor = null, $detail = null, $mode = null, $options = null)
{
parent::PEAR_Error($faultstring, $faultcode, $mode, $options, $detail);
if ($faultactor) {
$this->error_message_prefix = $faultactor;
}
}
示例2:
/**
* Overloaded FileMaker_Error constructor.
*
* @param FileMaker_Delegate $fm FileMaker_Delegate object this error
* came from.
* @param string $message Error message.
* @param integer $code Error code.
*/
function __construct($fm, $message = null, $code = null)
{
$this->_fm = $fm;
parent::PEAR_Error($message, $code);
// Log the error.
$fm->log($this->getMessage(), FILEMAKER_LOG_ERR);
}
示例3:
/**
* Overloaded FileMaker_Error constructor.
*
* @param FileMaker_Delegate &$fm FileMaker_Delegate object this error
* came from.
* @param string $message Error message.
* @param integer $code Error code.
*/
function FileMaker_Error(&$fm, $message = null, $code = null)
{
$this->_fm =& $fm;
parent::PEAR_Error($message, $code);
// Log the error.
$fm->log($this->getMessage(), FILEMAKER_LOG_ERR);
}
示例4: array
/**
* Ethna_Errorクラスのコンストラクタ
*
* @access public
* @param int $level エラーレベル
* @param string $message エラーメッセージ
* @param int $code エラーコード
* @param array $userinfo エラー追加情報(エラーコード以降の全ての引数)
*/
function Ethna_Error($message = null, $code = null, $mode = null, $options = null)
{
$controller =& Ethna_Controller::getInstance();
if ($controller !== null) {
$this->i18n =& $controller->getI18N();
}
// $options以降の引数->$userinfo
if (func_num_args() > 4) {
$userinfo = array_slice(func_get_args(), 4);
if (count($userinfo) == 1) {
if (is_array($userinfo[0])) {
$userinfo = $userinfo[0];
} else {
if (is_null($userinfo[0])) {
$userinfo = array();
}
}
}
} else {
$userinfo = array();
}
// メッセージ補正処理
if (is_null($message)) {
// $codeからメッセージを取得する
$message = $controller->getErrorMessage($code);
if (is_null($message)) {
$message = 'unkown error';
}
}
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
// Ethnaフレームワークのエラーハンドラ(PEAR_Errorのコールバックとは異なる)
Ethna::handleError($this);
}
示例5:
/**
*
*
* @param string
* @param mixed
* @param mixed
* @param mixed
* @param mixed
*/
function SOAP_Fault($message = 'unknown error', $code = null, $mode = null, $options = null, $userinfo = null)
{
if (is_array($userinfo)) {
$actor = $userinfo['actor'];
$detail = $userinfo['detail'];
} else {
$actor = 'Unknown';
$detail = $userinfo;
}
parent::PEAR_Error($message, $code, $mode, $options, $detail);
$this->error_message_prefix = $actor;
}
示例6:
function Services_JSON_Error($message = 'unknown error', $code = null, $mode = null, $options = null, $userinfo = null)
{
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
}
示例7: KTNoLocalUser
function KTNoLocalUser($aExtra = null)
{
parent::PEAR_Error(_kt('No local user with that username'));
$this->aExtra = $aExtra;
}
示例8: KTMetadataValidationError
function KTMetadataValidationError($aFailed)
{
$this->aFailed = $aFailed;
$message = _kt('Please be sure to enter information for all the Required fields below');
parent::PEAR_Error($message);
}
示例9: KTAPI_Error
/**
* This method determines if there is an error in the object itself or just a common error
*
* @author KnowledgeTree Team
* @access public
* @return VOID
*/
public function KTAPI_Error($msg, $obj = null)
{
if (PEAR::isError($obj)) {
parent::PEAR_Error($msg . ' - ' . $obj->getMessage());
} else {
parent::PEAR_Error($msg);
}
}
示例10:
function __construct($message = 'unknown error', $code = null, $mode = null, $options = null, $userinfo = null)
{
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
}