PHP code example of dbp / relay-verity-bundle
1. Go to this page and download the library: Download dbp/relay-verity-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/ */
dbp / relay-verity-bundle example snippets
...
Dbp\Relay\VerityBundle\DbpRelayVerityBundle::class => ['all' => true],
Dbp\Relay\CoreBundle\DbpRelayCoreBundle::class => ['all' => true],
];
namespace App\EventSubscriber;
use Dbp\Relay\VerityBundle\Event\VerityEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class VerityEventSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [
VeritasEvent::NAME => 'onVerity',
];
}
public function onVerity(VeritasEvent $event)
{
$report = $event->getReport();
// TODO: extract relevant information
$valid = $report->isValid();
}
}