1. Go to this page and download the library: Download designcise/bitframe-whoops library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
designcise / bitframe-whoops example snippets
new ErrorHandler(
ResponseFactoryInterface,
HandlerProviderNegotiator::class,
[options],
);
use BitFrame\App;
use BitFrame\Emitter\SapiEmitter;
use BitFrame\Whoops\ErrorHandler;
use BitFrame\Whoops\Provider\HandlerProviderNegotiator;
use BitFrame\Factory\HttpFactory;
$app = new App();
$middleware = function () {
throw new \Exception('hello world!');
};
$app->use([
SapiEmitter::class,
new ErrorHandler(HttpFactory::getFactory(), HandlerProviderNegotiator::class, [
'addTraceToOutput' => true,
'setJsonApi' => false,
]),
$middleware,
]);
$app->run();
use BitFrame\App;
use BitFrame\Whoops\ErrorHandler;
use BitFrame\Factory\HttpFactory;
$app = new App();
$app->run([
ErrorHandler::fromNegotiator(HttpFactory::getFactory(), [
'catchGlobalErrors' => true,
'addTraceToOutput' => true,
'setJsonApi' => false,
]),
]);
throw new \Exception('hello world!');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.