PHP code example of vtgianni / oops-bundle

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

    

vtgianni / oops-bundle example snippets


use VTGianni\OopsBundle\Service\OopsClient;

class MyService
{
    private $oopsClient;

    public function __construct(OopsClient $oopsClient)
    {
        $this->oopsClient = $oopsClient;
    }
}

$this->oopsClient->request(
    'GET',
    'https://pokeapi.co/api/v2/pokemon/ditto'
);

use VTGianni\OopsBundle\Service\OopsService;

class MyService
{
    private $oopsService;

    public function __construct(OopsService $oopsService)
    {
        $this->oopsService = $oopsService;
    }
}

$this->oopsService->reportError(
    $url, // , // optional string
    $headers, // optional array
    $bodyContent, // optional array
    $responseContent // optional array
);

$this->oopsService->filterErrors(
    $errorCode, // optional int
    $desc, // optional bool, default true
    $limit // optional int, default 10
);

$this->oopsService->countErrors(
    $nbDays, // optional int, default 7
    $errorCode // opitonal int
);
sh
php: >=7.4
doctrine/orm: >=2.13
symfony/framework-bundle: >=5.4
symfony/validator: >=4.4
symfony/http-client: >=4.4