本文整理汇总了PHP中Debug::show方法的典型用法代码示例。如果您正苦于以下问题:PHP Debug::show方法的具体用法?PHP Debug::show怎么用?PHP Debug::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debug
的用法示例。
在下文中一共展示了Debug::show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: geocodeMe
public function geocodeMe()
{
$address = "";
if (!empty($this->Address)) {
$address .= $this->Address;
} else {
Debug::show("sin dirección no se puede agregar en el mapa");
return false;
}
if (!empty($this->City)) {
$address .= ', ' . $this->City;
}
if (!empty($this->State)) {
$address .= ', ' . $this->State;
}
if (!empty($this->Zip)) {
$address .= ', ' . $this->Zip;
}
$g = new GoogleGeocoder();
$point = $g->addressToPoint($address);
if (!$point instanceof GeoPoint) {
$point = YahooGeocoder::addressToPoint($address);
} else {
$this->Lat = $point->Lat;
$this->Lng = $point->Lng;
}
if ($point instanceof GeoPoint) {
return true;
}
}
示例2: FixURLS
function FixURLS()
{
$pages = DataObject::get("Page");
foreach ($pages as $page) {
$page->write();
Debug::show($page);
}
}
示例3: __construct
/**
* Contrutor da classe
* @param string $url url acessada pelo usuário
*/
public function __construct($url)
{
define('CACHE_TIME', 60);
$cache_config = Config::get('cache');
if ($cache_config['page']) {
$cache = Cache::factory();
if ($cache->has(URL)) {
$data = $cache->read(URL);
exit($data);
}
}
$registry = Registry::getInstance();
$this->args = $this->args($url);
//I18n
define('lang', $this->args['lang']);
define('LANG', $this->args['lang']);
$i18n = I18n::getInstance();
$i18n->setLang(LANG);
$registry->set('I18n', $i18n);
function __($string, $format = null)
{
return I18n::getInstance()->get($string, $format);
}
function _e($string, $format = null)
{
echo I18n::getInstance()->get($string, $format);
}
define('controller', Inflector::camelize($this->args['controller']) . 'Controller');
define('action', str_replace('-', '_', $this->args['action']));
define('CONTROLLER', Inflector::camelize($this->args['controller']) . 'Controller');
define('ACTION', str_replace('-', '_', $this->args['action']));
try {
header('Content-type: text/html; charset=' . Config::get('charset'));
Import::core('Controller', 'Template', 'Annotation');
Import::controller(CONTROLLER);
$this->controller();
$this->auth();
$tpl = new Template();
$registry->set('Template', $tpl);
$tpl->render($this->args);
if ($cache_config['page']) {
$cache = Cache::factory();
$data = ob_get_clean();
$cache->write(URL, $data, $cache_config['time']);
}
Debug::show();
} catch (PageNotFoundException $e) {
header('HTTP/1.1 404 Not Found');
$this->loadError($e);
exit;
} catch (Exception $e) {
header('HTTP/1.1 500 Internal Server Error');
$this->loadError($e);
}
}
示例4: run
public static function run()
{
self::loadEventClass();
event("APP_START");
DEBUG and Debug::start("APP_START");
self::init();
self::start();
DEBUG and Debug::show("APP_START", "APP_END");
Log::save();
event("APP_END");
}
示例5: run
public static function run()
{
session(C("SESSION_OPTIONS"));
self::loadEventClass();
event("APP_START");
DEBUG and Debug::start("APP_START");
self::start();
DEBUG and Debug::show("APP_START", "APP_END");
Log::save();
event("APP_END");
}
示例6: startProcessing
public function startProcessing()
{
// Get all the traffic profiles
$profiles = TrafficProfile::get();
if ($profiles->Count() == 0) {
return null;
}
foreach ($profiles as $profile) {
Debug::show($profile);
}
return true;
}
示例7: renderAjax
protected final function renderAjax($errorCode, $errorMessage = '', $otherParams = array())
{
$otherParams['errorCode'] = $errorCode;
$otherParams['errorMessage'] = $errorMessage;
Response::output($otherParams, 'json', Router::$CALLBACK);
// debug
Debug::p('PHP End');
if (isset($_COOKIE['ajaxdebug']) && Router::$IS_AJAX) {
Debug::show();
}
exit;
}
示例8: all
public function all($settings = [])
{
$all = [];
if (!isset($settings['page'])) {
return $all;
}
try {
$all = $this->listFromMethod($settings['page'], isset($settings['limit']) ? $settings['limit'] : 5);
} catch (\Exception $e) {
\Debug::show($e->getMessage());
}
return $all;
}
示例9: details
public function details($settings = [])
{
$body = [];
try {
$body = $this->getBodyFromCache($this->endpoint(), $settings);
if (isset($body['result'])) {
$body = $body['result'];
}
} catch (\Exception $e) {
\Debug::show($e->getMessage());
}
return $body;
}
示例10: all
public function all($settings = [])
{
$all = [];
try {
$body = $this->getBodyFromCache($this->endpoint($settings['username']), $settings);
foreach ($body['items'] as $post) {
$all[] = $this->handlePost($post, $settings);
}
} catch (\Exception $e) {
\Debug::show($e->getMessage());
}
return $all;
}
示例11: all
public function all($settings = [])
{
$all = [];
$type = isset($settings['type']) ? $settings['type'] : $this->defaultType;
try {
$body = $this->getBodyFromCache($this->endpoint($type), $settings);
foreach ($body as $post) {
$all[] = $this->handlePost($post, $settings);
}
} catch (\Exception $e) {
\Debug::show($e->getMessage());
}
return $all;
}
示例12: channelSearch
public function channelSearch($username, $settings = [])
{
$all = [];
try {
$settings['query']['forUsername'] = $username;
if (!isset($settings['query']) || !isset($settings['query']['part'])) {
$settings['query']['part'] = 'id';
}
$body = $this->getBodyFromCache($this->endpoint('channels'), $settings);
$all = $body['items'];
} catch (\Exception $e) {
\Debug::show($e->getMessage());
}
return $all;
}
示例13: run
/**
* 运行应用
* @access public
* @reutrn mixed
*/
public static function run()
{
//session处理
session(C("SESSION_OPTIONS"));
//加载应用与事件处理类
self::loadEventClass();
//执行应用开始事件
event("APP_START");
//Debug Start
DEBUG and Debug::start("APP_START");
self::start();
//Debug End
DEBUG and Debug::show("APP_START", "APP_END");
//日志记录
Log::save();
event("APP_END");
}
示例14: updateFrontendActions
public function updateFrontendActions($actions)
{
Debug::show('here');
$svc = singleton('WorkflowService');
$active = $svc->getWorkflowFor($this->owner);
if ($active) {
if ($this->canEditWorkflow()) {
$actions->push(new FormAction('updateworkflow', _t('WorkflowApplicable.UPDATE_WORKFLOW', 'Update Workflow')));
}
} else {
$effective = $svc->getDefinitionFor($this->owner);
if ($effective) {
// we can add an action for starting off the workflow at least
$initial = $effective->getInitialAction();
$actions->push(new FormAction('startworkflow', $initial->Title));
}
}
}
示例15: run
/**
* 运行应用
* @access public
* @reutrn mixed
*/
public static function run()
{
event("APP_START");
//Debug Start
DEBUG and Debug::start("APP_START");
self::init();
self::start();
//Debug End
if (DEBUG) {
if (!C("DEBUG_AJAX") && IS_AJAX || !C("DEBUG_SHOW")) {
} else {
Debug::show("APP_START", "APP_END");
}
}
//日志记录
Log::save();
event("APP_END");
}