本文整理汇总了PHP中Notifications::addDebug方法的典型用法代码示例。如果您正苦于以下问题:PHP Notifications::addDebug方法的具体用法?PHP Notifications::addDebug怎么用?PHP Notifications::addDebug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Notifications
的用法示例。
在下文中一共展示了Notifications::addDebug方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pageAddMessages
function pageAddMessages($smarty)
{
if (Config::get('debug/debug')) {
Notifications::addDebug('PHP Version: ' . PHP_VERSION, true);
Notifications::addDebug('Current Time: ' . date('H:i:s'), true);
Notifications::addDebug(Notifications::getAsJson(), true);
}
$smarty->assign('notifications_success', Session::flashRead('notifications-success'));
$smarty->assign('notifications_info', Session::flashRead('notifications-info'));
$smarty->assign('notifications_warning', Session::flashRead('notifications-warning'));
$smarty->assign('notifications_error', Session::flashRead('notifications-error'));
$smarty->assign('alerts_success', Session::flashRead('alerts-success'));
$smarty->assign('alerts_info', Session::flashRead('alerts-info'));
$smarty->assign('alerts_warning', Session::flashRead('alerts-warning'));
$smarty->assign('alerts_error', Session::flashRead('alerts-error'));
return $smarty;
}
示例2: query
public function query($sql, $params = array())
{
$this->_error = false;
$params = array_values($params);
if (Config::get('debug/qrydump')) {
Notifications::addDebug($sql . ': ' . json_encode($params), true);
}
if ($this->_query = $this->_pdo->prepare($sql)) {
if (count($params)) {
foreach ($params as $index => $param) {
$this->_query->bindValue($index + 1, $param);
}
}
if ($this->_query->execute()) {
$this->_results = $this->_query->fetchAll(PDO::FETCH_OBJ);
$this->_count = $this->_query->rowCount();
} else {
$this->setError($this->_query->errorInfo());
}
} else {
$this->setError(array(0, 0, "Could not prepare SQL query: {$sql}"));
}
return $this;
}
示例3: error_reporting
<?php
error_reporting(E_ALL);
require_once 'vendor/smarty/smarty/libs/Smarty.class.php';
require_once 'vendor/autoload.php';
require_once 'dbsettings.php';
session_start();
date_default_timezone_set('Europe/Amsterdam');
@mkdir('storage', 0771, true);
@chmod('storage', 0771);
$GLOBALS['config'] = array('debug' => array('debug' => false, 'smartyDebug' => false, 'qrydump' => false), 'smarty' => array('caching' => true, 'cache_lifetime' => 120), 'mysql' => array('host' => $db_host, 'username' => $db_username, 'password' => $db_password, 'db' => $db_dbname), 'twilio' => array('sid' => 'AC45051091c1437e8c03b5151fc2487029', 'token' => '9c3e5fe94047edd008664ef25649de4b'), 'remember' => array('cookie_name' => 's1704362univ_remember', 'cookie_expiry' => 604800), 'session' => array('loggedId' => 's1704362univ_userId', 'token_name' => 's1704362univ_token'), 'validation' => array('user_info' => array('name' => array('name' => 'Username', 'min' => 1, 'max' => 50), 'sid' => array('name' => 'Student Number', 'wildcard' => 's???????'), 'email' => array('name' => 'Email Address', 'ofType' => array('email')), 'phone' => array('name' => 'Mobile/Phone Number', 'max' => 14, 'ofType' => array('phone'))), 'register_info' => array('name' => array('name' => 'Username', 'required' => true, 'min' => 1, 'max' => 50), 'sid' => array('name' => 'Student Number', 'required' => true, 'wildcard' => 's???????', 'unique' => 'users/student_id'), 'email' => array('name' => 'Email Address', 'ofType' => array('email')), 'phone' => array('name' => 'Mobile/Phone Number', 'max' => 14, 'ofType' => array('phone'))), 'set_password' => array('password' => array('name' => 'Password', 'required' => true, 'min' => 4, 'max' => 72), 'password_again' => array('name' => 'Repeat Password', 'required' => true, 'matches' => 'password')), 'login' => array('sid' => array('name' => 'Student Number', 'required' => true, 'wildcard' => 's???????'), 'password' => array('name' => 'Password', 'required' => true, 'max' => 72))));
spl_autoload_register(function ($class) {
require_once 'app/classes/' . $class . '.php';
});
require_once 'app/functions/sanitize.php';
require_once 'app/functions/misc.php';
Users::init();
Phone::init();
Update::doUpdate();
if (Config::get('debug/debug')) {
Notifications::addDebug('POST data: ' . json_encode($_POST), true);
}