-
-
Notifications
You must be signed in to change notification settings - Fork 424
Expand file tree
/
Copy pathbootstrap.php
More file actions
51 lines (45 loc) · 1.43 KB
/
Copy pathbootstrap.php
File metadata and controls
51 lines (45 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
include __DIR__ . '/../vendor/autoload.php';
// for stack data
session_start();
use DebugBar\StandardDebugBar;
$debugbar = new StandardDebugBar();
$debugbarRenderer = $debugbar->getJavascriptRenderer()
->setBaseurl(/sitelet?url=https%3A%2F%2Fgithub.com%2Fphp-debugbar%2Fphp-debugbar%2Fblob%2Ftest-integration%2Fdemo%2F%26%23039%3B..%2Fsrc%2FDebugBar%2FResources%26%23039%3B)
->setEnableJqueryNoConflict(false);
//
// create a writable profiles folder in the demo directory to uncomment the following lines
//
// $debugbar->setStorage(new DebugBar\Storage\FileStorage(__DIR__ . '/profiles'));
// $debugbar->setStorage(new DebugBar\Storage\RedisStorage(new Predis\Client()));
// $debugbarRenderer->setOpenHandlerurl(/sitelet?url=https%3A%2F%2Fgithub.com%2Fphp-debugbar%2Fphp-debugbar%2Fblob%2Ftest-integration%2Fdemo%2F%26%23039%3Bopen.php%26%23039%3B);
function render_demo_page(Closure $callback = null)
{
global $debugbarRenderer;
?>
<html>
<head>
<?php echo $debugbarRenderer->renderHead() ?>
<script type="text/javascript">
$(function() {
$('.ajax').click(function() {
var container = $(this).parent().html('...');
$.get(this.href, function(data) {
container.html(data);
});
return false;
});
});
</script>
</head>
<body>
<h1>DebugBar Demo</h1>
<p>DebugBar at the bottom of the page</p>
<?php if ($callback) $callback(); ?>
<?php
echo $debugbarRenderer->render();
?>
</body>
</html>
<?php
}