本文整理汇总了PHP中debug::dump方法的典型用法代码示例。如果您正苦于以下问题:PHP debug::dump方法的具体用法?PHP debug::dump怎么用?PHP debug::dump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类debug
的用法示例。
在下文中一共展示了debug::dump方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cms_nav
function cms_nav($link, $segment = NULL)
{
debug::dump($this);
$CI =& get_instance();
if ($link == $CI->uri->segment($segment)) {
if ($link == NULL) {
$link = "dashboard";
}
// Necessary for home page (since it's not a sub directory)
$link = ' class="current"';
return $link;
// Adds CSS class name 'base' to links matching site location.
}
}
示例2: index
public function index()
{
$ci =& get_instance();
$basepath = 'application/modules';
$dir = new RecursiveIteratorIterator(new RecursiveRegexIterator(new RecursiveDirectoryIterator($basepath), '#(?<!/)\\/config\\/[A-z]+_dashboard\\.php$|^[^\\.]*$#i'), true);
foreach ($dir as $d) {
if ($d->isFile()) {
$_packages[] = dirname(dirname($d->getPathname()));
// application/modules/menus/
$_configs[] = $d->getFilename();
}
}
$helper = new Site_View_Helper_Pod();
foreach ($_packages as $k => $v) {
/*
*Load mvc for each module with a dashboard config
*/
$ci->load->add_package_path($v);
/*
* Load that config file and the model and model->method from its config array
*/
$ci->config->load(str_replace('.php', '', $_configs[$k]));
// menus_dashboard
$ci->load->model($ci->config->item('_model'));
$_model = $ci->config->item('_model');
$_method = $ci->config->item('_method');
$ci->config->item('_args') ? $args = $ci->config->item('_args') : ($args = null);
/*
* Get the properties of the Pod kids from the config file
*/
$ci->config->item('head_tag') ? $head_tag = $ci->config->item('head_tag') : ($head_tag = array('tag' => 'h2'));
$ci->config->item('ul') ? $ul = $ci->config->item('ul') : ($ul = array('tag' => 'ul'));
$ci->config->item('li') ? $li = $ci->config->item('li') : ($li = array('tag' => 'li'));
$ci->config->item('a') ? $a = $ci->config->item('a') : ($a = array());
/*
* Set the Heading of each pod
*/
$_heading = $ci->config->item('_heading') ? $_heading = $ci->config->item('_heading') : ($_heading = ucfirst(basename($obj['path'])));
/*
* Set the properties of the Pod parent and each Pod wrap
*/
$podParent = array('tag' => 'div', 'class' => 'pods');
$podKids = array('tag' => 'div', 'class' => 'pod one-third');
/*
* Create a class property to hold the data of the model
*/
/*
pod(array $data,
array $wrapperAttribs = array('tag' => 'div', 'class' => 'pods'),
array $podAttribs = array('tag' => 'div', 'class' => 'pod one-third'),
array $headingAttribs = array('tag' => 'h2', 'class' => 'headingClass'),
array $ulAttribs = array('tag' => 'ul', 'class' => 'podUlClass'),
array $liAttribs = array('tag' => 'li', 'class' => 'liClass'),
array $aAttribs = array('class' => 'linkClass')
*/
$pod[$_heading] = $ci->{$_model}->{$_method}($args);
$final[] = $pod;
$final[] = $podParent;
$final[] = $podKids;
$final[] = $head_tag;
$final[] = $ul;
$final[] = $li;
$ci->load->remove_package_path();
unset($pod);
}
if (isset($final)) {
$helper->setView(new Zend_View());
//$pods = $helper->pod($pod, $podParent, $podKids, $head_tag, $ul, $li, $a);
//$li=array();
}
debug::dump($final);
return $helper->pod($final);
unset($final);
continue;
}
示例3: debug
/**
* Send query data to debug bar
*
* @access public
* @return void
*/
public function debug()
{
$debug = array();
$debug['request'] = $this->prepare_request;
$debug['count'] = $this->count;
$debug['cache'] = $this->cache;
$debug['cached'] = $this->cached;
if ($this->ok() && $this->which == "ALL") {
$debug['results'] = $this->getArray();
} elseif ($this->ok() && $this->which == "FIRST") {
$debug['results'] = $this->get();
}
debug::dump($debug, lang::text('sql:request'));
}
示例4: manage
/**
* Manage
*
* @access public
* @param int
* @return void
*/
public function manage($id = NULL)
{
if (!$id) {
$this->template->_message('Invalid request', 'error', 'admin/pages');
}
$data->parent = $this->pages->get($id);
debug::dump($data->parent);
exit;
$data->rows = $this->pages->list_by_type($data->parent->typeX);
$this->template->title('Manage ' . $data->parent->title)->set_breadcrumb('Site Content', '/admin/pages')->build('admin/manage', $data);
}
示例5: env
static function env()
{
$raw= function($channel)
{
if ($channel=='_COOKIE') $data= $_COOKIE;
elseif ($channel=='_GET') $data= $_GET;
elseif ($channel=='_COOKIE') $data= $_COOKIE;
elseif ($channel=='_POST') $data= $_POST;
elseif ($channel=='_SESSION') $data= $_SESSION;
elseif ($channel=='_SERVER') $data= $_SERVER;
if ($channel=='_SERVER')
{
echo '<tr><th colspan="3" onclick="document.getElementById(\'conkit-'.$channel.'\').style.display=\'table-row-group\'">$'.$channel.' ▾</th></tr>';
echo '<tbody id="conkit-'.$channel.'" style="display:none;">';
}
else
{
echo '<tr><th colspan="3">$'.$channel.'</th></tr>';
echo '<tbody id="conkit-'.$channel.'">';
}
if ($data)
{
foreach ($data as $name=>$value)
{
echo "<tr><td>$name</td><td>";
debug::dump($value);
echo '</td><td align="center">';
if ($channel=='_SERVER') echo '';
elseif (!isset(core::$req[$name])) echo '✗';
elseif ($channel=='_FILE') echo '✓';
elseif (core::$req[$name]==$value) echo '✓';
else echo '≠';
echo '</td></tr>';
}
}
echo '</tbody>';
};
$reg= function($channel)
{
echo '<tr><th colspan="3">core::'.$channel.'()</th></tr>';
echo '<tbody id="conkit-'.$channel.'">';
foreach (core::$channel() as $name=>$value)
{
echo "<tr><td>$name</td><td>";
debug::dump($value);
echo '</td><td></td></tr>';
}
echo '</tbody>';
};
echo '<table border="1">';
echo '<tr><th>Name</th><th>Value</th><th>core::req</th></tr>';
$raw('_COOKIE');
$raw('_GET');
$raw('_POST');
$raw('_FILES');
$raw('_SESSION');
$raw('_SERVER');
$reg('req');
$reg('reg');
$reg('vars');
echo '</table>';
}