本文整理匯總了PHP中JError::raiserError方法的典型用法代碼示例。如果您正苦於以下問題:PHP JError::raiserError方法的具體用法?PHP JError::raiserError怎麽用?PHP JError::raiserError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JError
的用法示例。
在下文中一共展示了JError::raiserError方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: load
/**
* TuiyoParameter::load()
*
* @param mixed $data
* @param mixed $xmlFilePath
* @return
*/
public function load($key, $xmlFilePath = NULL)
{
$iniPath = TUIYO_CONFIG . DS . strtolower($key) . ".ini";
$xmlFilePath = empty($xmlFilePath) ? TUIYO_CONFIG . DS . strtolower($key) . ".xml" : $xmlFilePath;
if (!file_exists($iniPath) || !is_file($xmlFilePath)) {
JError::raiserError(TUIYO_SERVER_ERROR, _('The required config element does not exists'));
return false;
}
$content = file_get_contents($iniPath);
$params = new JParameter($content, $xmlFilePath);
return $params;
}
示例2: getMessageFolderFromCode
public function getMessageFolderFromCode($folder_id, $userID)
{
$user = TuiyoAPI::get("user", NULL);
//If we don't have a valid user Type
if (is_null($folder_id) || is_null($userID)) {
JError::raiserError(TUIYO_SERVER_ERROR, "Invalid folder type provided");
return false;
}
//Determine if this user is the sender
$isSender = (int) $userID != $user->id ? false : true;
$sFid = (string) $folder_id;
$recipientDir = (int) $sFid[1];
$senderDir = (int) $sFid[0];
//Folder Maps
$maps = array("folders" => array(0 => "inbox", 1 => "sent", 2 => "inbox", 3 => "trash"));
if ($isSender) {
$folder = $maps["folders"][$senderDir];
} else {
$folder = $maps["folders"][$recipientDir];
}
return $folder;
}