PHP code example of pccomponentes / apixception-bundle
1. Go to this page and download the library: Download pccomponentes/apixception-bundle 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/ */
pccomponentes / apixception-bundle example snippets
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
PcComponentes\Apixception\ApixceptionBundle::class => ['all' => true]
];
namespace MyApp\Transformers;
use PcComponentes\Apixception\Core\Transformer\ExceptionTransformer;
class CustomTransformer extends ExceptionTransformer
{
public function transform(\Throwable $exception): array
{
return [
'exception' => \get_class($exception),
'message' => $exception->getMessage(),
];
}
}