本文整理汇总了PHP中debug::msg方法的典型用法代码示例。如果您正苦于以下问题:PHP debug::msg方法的具体用法?PHP debug::msg怎么用?PHP debug::msg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类debug
的用法示例。
在下文中一共展示了debug::msg方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAllContents
protected function getAllContents($data)
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select('distinct p.idcontenuto AS idcontenuto, c.titolo as titolo, c.descrizione as descrizione ');
$query->from('#__gg_palinsesti as p ');
$query->join('left', '#__gg_contenuti as c ON c.id = p.idcontenuto ');
$query->where('idcontenuto not in (select idcontenuto from #_tv_palinsesti where datapalinsesto = "' . $data . '" )');
$query->order('datapalinsesto desc, ordinamento ');
debug::msg((string) $query);
$db->setQuery((string) $query, 0, 20);
$res = $db->loadAssocList();
return $res;
}
示例2: _processor
public function _processor($options = false)
{
if (is_array($options)) {
$options = (object) $options;
}
$force_json = gettype($options) == 'object' && isset($options->force_json) && $options->force_json ? true : false;
$force_stop = gettype($options) == 'object' && isset($options->force_stop) && $options->force_stop ? true : false;
$not_redirect = gettype($options) == 'object' && isset($options->not_redirect) && $options->not_redirect ? true : false;
if ($this->transaction && debug::$status) {
if (isset($this->sql)) {
$this->sql->commit();
}
if (count($this->commit)) {
call_user_func_array($this->commit[0], array_slice($this->commit, 1));
}
} elseif ($this->transaction && !debug::$status) {
if (isset($this->sql)) {
$this->sql->rollback();
}
if (count($this->rollback)) {
call_user_func_array($this->rollback[0], array_slice($this->rollback, 1));
}
}
if ($not_redirect) {
$this->controller()->redirector = false;
}
if (\saloos::is_json_accept() || $force_json) {
header('Content-Type: application/json');
if (isset($this->controller()->redirector) && $this->controller()->redirector) {
$_SESSION['debug'][md5(strtok($this->redirector()->redirect(true), '?'))] = debug::compile();
debug::msg("redirect", $this->redirector()->redirect(true));
}
echo debug::compile(true);
} elseif (!\lib\router::get_storage('api') && strtolower($_SERVER['REQUEST_METHOD']) == "post") {
$this->redirector();
}
if (isset($this->controller()->redirector) && $this->controller()->redirector && !\saloos::is_json_accept()) {
$_SESSION['debug'][md5(strtok($this->redirector()->redirect(true), '?'))] = debug::compile();
$this->redirector()->redirect();
}
if ($force_stop) {
exit;
}
}
示例3: get_congressi
public function get_congressi($type) {
try {
$type = filter_var($type, FILTER_VALIDATE_INT, array('options' => array('min_range' => self::TYPE_VIRTUALFORUM, 'max_range' => self::TYPE_SPECIALECONGRESSI)));
if (empty($type))
throw new BadMethodCallException('Virtual Forum o Speciale Congressi?', E_USER_ERROR);
$query = 'SELECT
id,
congresso,
alias
FROM psn_gg_congressi
WHERE pubblicato = 1
AND tipologia=' . $type . '
ORDER BY ordinamento DESC';
$this->_db->setQuery($query);
debug::msg($query);
return $this->_db->loadAssocList();
} catch (Exception $e) {
debug::exception($e);
return array();
}
}
示例4: get_congresso
public function get_congresso($id) {
try {
debug::vardump($id, 'id');
$id = filter_var($id, FILTER_VALIDATE_INT, array('options' => array('min_range' => 1)));
if (empty($id))
throw new BadMethodCallException('Identificativo congresso non specificato o non valido', E_USER_ERROR);
$query = 'SELECT
c.congresso,
c.banner,
c.abstract AS abstract_congresso,
c.alias AS alias_congresso,
i.*
FROM #__gg_congressi AS c
LEFT JOIN #__gg_contenuti AS i ON i.id_congresso = c.id
WHERE c.pubblicato = 1 AND c.id = ' . $id;
$this->_db->setQuery($query);
debug::msg($query);
return $this->_db->loadAssocList();
} catch (Exception $e) {
debug::exception($e);
}
}
示例5: setTrack
/**
* Traccio la visualizzazioen
*/
public function setTrack($user_id, $content_id, $tpl) {
try {
$query = "INSERT INTO
#__gg_log (id_utente, id_contenuto, data_accesso, supporto)
values($user_id, $content_id, now(), '$tpl')
";
debug::msg($query);
$this->_db->setQuery($query);
if (false === ($results = $this->_db->query()))
throw new RuntimeException($this->_db->getErrorMsg(), E_USER_ERROR);
return $results;
} catch (Exception $e) {
jimport('joomla.error.log');
$log = &JLog::getInstance('com_gglms.log.php');
$log->addEntry(array('comment' => $e->getMessage(), 'status' => $e->getCopde));
if ($this->_dbg)
$this->_japp->enqueueMessage($e->getMessage(), 'error');
}
}