Add PrettyPageHandler::addDataTable & example

This commit is contained in:
filp
2013-03-14 11:34:43 +00:00
parent 728d8f0337
commit a23dfa9c66
2 changed files with 49 additions and 2 deletions
+12 -2
View File
@@ -22,8 +22,18 @@ require __DIR__ . '/../vendor/autoload.php';
class Exception extends BaseException {}
$run = new Run;
$run->pushHandler(new PrettyPageHandler);
$run = new Run;
$handler = new PrettyPageHandler;
// Add a custom table to the layout:
$handler->addDataTable('Ice-cream I like', array(
'Chocolate' => 'yes',
'Coffee & chocolate' => 'a lot',
'Strawberry & chocolate' => 'it\'s alright',
'Vanilla' => 'ew'
));
$run->pushHandler($handler);
// Example: tag all frames with a comment
$run->pushHandler(function($exception, $inspector, $run) {