本文整理匯總了PHP中JError::raisewarning方法的典型用法代碼示例。如果您正苦於以下問題:PHP JError::raisewarning方法的具體用法?PHP JError::raisewarning怎麽用?PHP JError::raisewarning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JError
的用法示例。
在下文中一共展示了JError::raisewarning方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getForm
function getForm()
{
if ($this->_eventid) {
$query = ' SELECT f.* ' . ' FROM #__redevent_events AS e ' . ' INNER JOIN #__rwf_forms AS f ON e.redform_id = f.id ' . ' WHERE e.id = ' . $this->_db->Quote($this->_eventid);
} else {
if ($this->_xref) {
$query = ' SELECT f.* ' . ' FROM #__redevent_events AS e ' . ' INNER JOIN #__redevent_event_venue_xref AS x ON x.eventid = e.id ' . ' INNER JOIN #__rwf_forms AS f ON e.redform_id = f.id ' . ' WHERE x.id = ' . $this->_db->Quote($this->_xref);
} else {
JError::raisewarning(0, 'No event or session id !');
return false;
}
}
$this->_db->setQuery($query, 0, 1);
$res = $this->_db->loadObject();
// echo '<pre>';print_r($this->_db->getQuery()); echo '</pre>';exit;
return $res;
}
示例2: copyAdapter
function copyAdapter()
{
$file = JPATH_COMPONENT_ADMINISTRATOR . '/lib/expackage.php';
$path = UPDATER_ADAPTER_PATH;
@copy($file, $path);
if (!file_exists($path)) {
JError::raisewarning(2000, 'ERROR: could not install package adapter. Packages will not install properly. Please manually copy:' . "<br>\n{$file} to <br>\n" . $path);
return false;
}
return true;
}