PHP code example of nowo-tech / beacon-bundle

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

    

nowo-tech / beacon-bundle example snippets


use Nowo\BeaconBundle\Client\BeaconClientInterface;

final class PaymentService
{
    public function __construct(private readonly BeaconClientInterface $beacon)
    {
    }

    public function charge(): void
    {
        try {
            // ...
        } catch (\Throwable $exception) {
            $this->beacon->captureException($exception, ['order_id' => 42]);
            throw $exception;
        }
    }
}
bash
php bin/console nowo:beacon:test
text
{scheme}://{public_key}:{secret}@{host}[:{port}]/{project_id}