[enh] Bootstrap PHP interface
This commit is contained in:
37
sources/lib/limonade/views/_debug.html.php
Normal file
37
sources/lib/limonade/views/_debug.html.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php if(option('env') > ENV_PRODUCTION && option('debug')): ?>
|
||||
<?php if(!$is_http_error): ?>
|
||||
<p>[<?php echo error_type($errno)?>]
|
||||
<?php echo $errstr?> (in <strong><?php echo $errfile?></strong> line <strong><?php echo $errline?></strong>)
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<?php if($debug_args = set('_lim_err_debug_args')): ?>
|
||||
<h2 id="debug-arguments">Debug arguments</h2>
|
||||
<pre><code><?php echo h(print_r($debug_args, true))?></code></pre>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2 id="limonade-options">Options</strong></h2>
|
||||
<pre><code><?php echo h(print_r(option(), true))?></code></pre>
|
||||
<p class="bt top"><a href="#header">[ ↑ ]</a></p>
|
||||
|
||||
<h2 id="environment">Environment</h2>
|
||||
<pre><code><?php echo h(print_r(env(), true))?></code></pre>
|
||||
<p class="bt top"><a href="#header">[ ↑ ]</a></p>
|
||||
|
||||
<h2 id="debug-backtrace">Backtrace</h2>
|
||||
<pre><code><?php echo h(print_r(debug_backtrace(), true))?></code></pre>
|
||||
<p class="bt top"><a href="#header">[ ↑ ]</a></p>
|
||||
|
||||
<div id="debug-menu">
|
||||
|
||||
<?php if($debug_args = set('_lim_err_debug_args')): ?>
|
||||
<a href="#debug-arguments">Debug arguments</a> |
|
||||
<?php endif; ?>
|
||||
<a href="#limonade-options">Options</a> |
|
||||
<a href="#environment">Environment</a> |
|
||||
<a href="#debug-backtrace">Backtrace</a> |
|
||||
<a href="#header">[ ↑ ]</a>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
15
sources/lib/limonade/views/_notices.html.php
Normal file
15
sources/lib/limonade/views/_notices.html.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php if(!empty($notices)): ?>
|
||||
<div class="lim-debug lim-notices">
|
||||
<h4> → Notices and warnings</h4>
|
||||
<dl>
|
||||
<?php $cpt = 1; foreach($notices as $notice): ?>
|
||||
<dt>[<?php echo $cpt.'. '.error_type($notice['errno'])?>]</dt>
|
||||
<dd>
|
||||
<?php echo $notice['errstr']?> in <strong><code><?php echo $notice['errfile']?></code></strong>
|
||||
line <strong><code><?php echo $notice['errline']?></code></strong>
|
||||
</dd>
|
||||
<?php $cpt++; endforeach; ?>
|
||||
</dl>
|
||||
<hr>
|
||||
</div>
|
||||
<?php endif; ?>
|
22
sources/lib/limonade/views/default_layout.php
Normal file
22
sources/lib/limonade/views/default_layout.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Limonade, the fizzy PHP micro-framework</title>
|
||||
<link rel="stylesheet" href="<?php echo url_for('/_lim_css/screen.css');?>" type="text/css" media="screen">
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<h1>Limonade</h1>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<?php echo error_notices_render(); ?>
|
||||
<div id="main">
|
||||
<?php echo $content;?>
|
||||
<hr class="space">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
6
sources/lib/limonade/views/error.html.php
Normal file
6
sources/lib/limonade/views/error.html.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1><?php echo h(error_http_status($errno));?></h1>
|
||||
<?php if($is_http_error): ?>
|
||||
<p><?php echo h($errstr)?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo render('_debug.html.php', null, $vars); ?>
|
Reference in New Issue
Block a user