PHP code example of rinsvent / exception-bundle

1. Go to this page and download the library: Download rinsvent/exception-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/ */

    

rinsvent / exception-bundle example snippets




declare(strict_types=1);

namespace App\EventListener;

use App\Exception\ExceptionEnum;
use Rinsvent\Exception\AbstractException;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener(event: 'kernel.request', priority: 1000, method: 'onStart')]
class StartConfigListener
{
    public function onStart(): void
    {
        AbstractException::$exceptionEnum = ExceptionEnum::class;
    }
}