本文整理匯總了PHP中rcmail::raise_error方法的典型用法代碼示例。如果您正苦於以下問題:PHP rcmail::raise_error方法的具體用法?PHP rcmail::raise_error怎麽用?PHP rcmail::raise_error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rcmail
的用法示例。
在下文中一共展示了rcmail::raise_error方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: init
/**
* Plugin initialization
*/
public function init()
{
// check requirements first
if (!class_exists('ZipArchive', false)) {
rcmail::raise_error(array('code' => 520, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, 'message' => "php_zip extension is required for the zipdownload plugin"), true, false);
return;
}
$rcmail = rcmail::get_instance();
$this->load_config();
$this->charset = $rcmail->config->get('zipdownload_charset', RCUBE_CHARSET);
$this->add_texts('localization');
if ($rcmail->config->get('zipdownload_attachments', 1) > -1 && ($rcmail->action == 'show' || $rcmail->action == 'preview')) {
$this->add_hook('template_object_messageattachments', array($this, 'attachment_ziplink'));
}
$this->register_action('plugin.zipdownload.zip_attachments', array($this, 'download_attachments'));
$this->register_action('plugin.zipdownload.zip_messages', array($this, 'download_selection'));
$this->register_action('plugin.zipdownload.zip_folder', array($this, 'download_folder'));
if ($rcmail->config->get('zipdownload_folder', false) || $rcmail->config->get('zipdownload_selection', false)) {
$this->include_script('zipdownload.js');
$this->api->output->set_env('zipdownload_selection', $rcmail->config->get('zipdownload_selection', false));
if ($rcmail->config->get('zipdownload_folder', false) && ($rcmail->action == '' || $rcmail->action == 'show')) {
$zipdownload = $this->api->output->button(array('command' => 'plugin.zipdownload.zip_folder', 'type' => 'link', 'classact' => 'active', 'content' => $this->gettext('downloadfolder')));
$this->api->add_content(html::tag('li', array('class' => 'separator_above'), $zipdownload), 'mailboxoptions');
}
}
}
示例2: init
/**
* Plugin initialization
*/
public function init()
{
// check requirements first
if (!class_exists('ZipArchive', false)) {
rcmail::raise_error(array('code' => 520, 'file' => __FILE__, 'line' => __LINE__, 'message' => "php_zip extension is required for the zipdownload plugin"), true, false);
return;
}
$rcmail = rcmail::get_instance();
$this->load_config();
$this->charset = $rcmail->config->get('zipdownload_charset', RCUBE_CHARSET);
$this->add_texts('localization');
if ($rcmail->config->get('zipdownload_attachments', 1) > -1 && ($rcmail->action == 'show' || $rcmail->action == 'preview')) {
$this->add_hook('template_object_messageattachments', array($this, 'attachment_ziplink'));
}
$this->register_action('plugin.zipdownload.attachments', array($this, 'download_attachments'));
$this->register_action('plugin.zipdownload.messages', array($this, 'download_messages'));
if (!$rcmail->action && $rcmail->config->get('zipdownload_selection')) {
$this->download_menu();
}
}
示例3: while
while ($redirects < 5) {
// execute a plugin action
if ($RCMAIL->plugins->is_plugin_task($RCMAIL->task)) {
if (!$RCMAIL->action) {
$RCMAIL->action = 'index';
}
$RCMAIL->plugins->exec_action($RCMAIL->task . '.' . $RCMAIL->action);
break;
} else {
if (preg_match('/^plugin\\./', $RCMAIL->action)) {
$RCMAIL->plugins->exec_action($RCMAIL->action);
break;
} else {
if (($stepfile = $RCMAIL->get_action_file()) && is_file($incfile = INSTALL_PATH . 'program/steps/' . $RCMAIL->task . '/' . $stepfile)) {
// include action file only once (in case it don't exit)
include_once $incfile;
$redirects++;
} else {
break;
}
}
}
}
if ($RCMAIL->action == 'refresh') {
$RCMAIL->plugins->exec_hook('refresh', array('last' => intval(rcube_utils::get_input_value('_last', rcube_utils::INPUT_GPC))));
}
// parse main template (default)
$OUTPUT->send($RCMAIL->task);
// if we arrive here, something went wrong
rcmail::raise_error(array('code' => 404, 'type' => 'php', 'line' => __LINE__, 'file' => __FILE__, 'message' => "Invalid request"), true, true);
示例4: __pear_error
/**
* Local callback function for PEAR errors
*/
function __pear_error($err)
{
rcmail::raise_error(array('code' => $err->getCode(), 'message' => $err->getMessage()));
}
示例5: raise_error
function raise_error($arg = array(), $log = false, $terminate = false)
{
rcmail::raise_error($arg, $log, $terminate);
}
示例6: raise_error
function raise_error($arg = array(), $log = false, $terminate = false)
{
_deprecation_warning(__FUNCTION__);
rcmail::raise_error($arg, $log, $terminate);
}