aterrien / forp
Wrapper for forp PHP profiler extension.
dev-master
2013-11-14 22:32 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-02-25 04:27:24 UTC
README
forp-php is a composer package that "simplifies" usage of forp PHP profiler on your application.
What it does :
- it starts forp PHP profiler.
- it registers the forp output callback on shutdown of the PHP script.
- it selects the most appropriate response to the client.
Dependencies
Server-side :
- forp-PHP-profiler : must be installed on your server
Client-side :
- forp-chrome : Chrome client for Chrome users
OR
- forp-ui : forp.min.js must be put on your own CDN
API = start($opts)
With $opts :
array( 'no_internals' => 1, // enable/disable collect of PHP internals 'ui_src' => '<your forp-ui cdn>', // URL of forp-ui forp.min.js on your CDN @link https://github.com/aterrien/forp-ui/ 'flags' => self::FLAG_ALL, // forp flags @link https://github.com/aterrien/forp-PHP-profiler/#forp_start-flags )
Example :
// if($theCurrentRequestCanProfileTheCurrentScript) { $Forp = new Forp\Forp(array( 'ui_src' => '<your forp-ui cdn>', )); $Forp->start(); // }
It can be done in an auto-prepend-file.
Install
Just add this package to the requires of your project (composer.json
):
{ "require":{ "aterrien/forp": "dev-master" } }
Don't forget to run the install command.