本文整理匯總了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);
}