本文整理汇总了PHP中D::show方法的典型用法代码示例。如果您正苦于以下问题:PHP D::show方法的具体用法?PHP D::show怎么用?PHP D::show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类D
的用法示例。
在下文中一共展示了D::show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test
function test() {
D::show($this->__pull, 'pull');
D::show(($this->__data), 'first data');
}
示例2: var_dump
{
echo "in SE: accessing SC\n";
var_dump(get_class_vars('SC'));
echo "in SE: accessing SD\n";
var_dump(get_class_vars('SD'));
echo "in SE: accessing SE\n";
var_dump(get_class_vars('SE'));
}
}
echo ">>> testing instance variables from global scope\n";
echo "accessing C\n";
var_dump(get_class_vars('C'));
echo "accessing D\n";
var_dump(get_class_vars('D'));
echo "accessing E\n";
var_dump(get_class_vars('E'));
echo ">>> testing instance variables from class scope\n";
C::show();
D::show();
E::show();
echo ">>> testing static variables from global scope\n";
echo "accessing SC\n";
var_dump(get_class_vars('SC'));
echo "accessing SD\n";
var_dump(get_class_vars('SD'));
echo "accessing SE\n";
var_dump(get_class_vars('SE'));
echo ">>> testing static variables from class scope\n";
SC::show();
SD::show();
SE::show();
示例3: warn
static function warn($warning='Warning') {
//D::show('WHAT');
if(self::$config['warnings']) {
if(!extension_loaded('xdebug')) {
D::show(D::stack(), $warning);
}
trigger_error($warning);
}
}
示例4: redirect
function redirect($uri = '', $http_response_code = 302) {
if(substr($uri, 0, 7) != 'http://') {
//@todo fix this so it works with https
/*
$this->callRoute($uri);
exit;
*/
if($uri == '/') {
$uri = SITE_URL;
} else {
$uri = SITE_URL . $uri;
}
}
//@todo make this be set off with the debug switch. and if debugging is on it should show a link to the page it would have forwarded to.
if(headers_sent()) {
D::show('Headers already sent.', B::a(array('href' => $uri), $uri));
} else {
header('Location: ' . $uri, TRUE, $http_response_code);
/* @todo you should call an app end event here.*/
SweetFramework::end(true);
}
}