dev-master
9999999-dev http://github.com/pickabooSimple debug helper
MIT
The Requires
- php >=5.4
debug education
Simple debug helper
Thunder is a simple, light weight, debug helper for the PHP framework Anax. By setting a marker in a class or a function - a frame will be generated that can be viewed by adding the View to you page., (*1)
The marker will provide information about, (*2)
See below for Usage and more info., (*3)
By Andreas Hultman, andreas.hultman@me.com, (*4)
This software is free software and carries a MIT license., (*5)
Thunder uses Bootstrap and Fontawesome. These are included in the view template using the CDN support from maxCDN. So make sure that you are online when using Thunder., (*6)
You can either clone it from github or use Composer to install with Packagist. For installation with Composer - require the package in your composer.json using:, (*7)
"anhu/thunder": "dev-master"
add to project, (*8)
In Anax the easiest way to include Thunder is to add it do $di in the froncontroller., (*9)
$di->setShared('thunder', function() { $thunder = new \Anhu\Thunder\CThunder(); return $thunder; });
output result to a view, (*10)
A template view are included in the package (thunder.tpl.php). In Anax framework just simply move it to your view folder and add in frontcontroller., (*11)
$app->router->add('thunder', function() use ($app) { $app->theme->setVariable('title', "Thunder test"); $app->views->add('packTest/thunder', [ 'content' => $app->thunder->getMarkers(), ]); });
When thunder is included you can put a mark anywhere in your code. When the mark runs - information is saved to the session and will be available for output in a view. There are several different ways you can set a mark., (*12)
Examples below shows how mark is set after thunder are included in $di - in the Anax framework. If included in another way make sure to adjust path to setMarker., (*13)
the marker, (*14)
The mark is set by calling the setMarker function and passing a message and an optional parameter., (*15)
$this->di->thunder->setMarker("This is my own message", $Optional);
, (*16)
Its possible to pass values in the first parameter aswell and use Html., (*17)
$this->di->thunder->setMarker("<h1>Value of $x -> Value of $z</h1>", $testVar);
, (*18)
knock your self out ..., (*19)
8/29/2014 Ver 0.1 - First attempt, (*20)
Simple debug helper
MIT
debug education