PHP code example of rxthunder / eventstore

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

    

rxthunder / eventstore example snippets


# config/parameters.php

$container->setParameter('eventstore.http', getenv('EVENTSTORE_DSN_HTTP'));
$container->setParameter('eventstore.tcp', getenv('EVENTSTORE_DSN_TCP'));

# config/services.php

ore\Console\EventStoreConsole;
use RxThunder\EventStore\Console\EventStoreSetupConsole;

$container->register(EventStoreConsole::class)
    ->setPublic(true)
    ->setAutowired(true)
    ->setAutoconfigured(true)
;

$container->register(EventStoreSetupConsole::class)
    ->setPublic(true)
    ->setAutowired(true)
    ->setAutoconfigured(true)
;

# config/services.php

 '/../vendor/rxthunder/eventstore/config/consoles.php';

$container->setAlias(\Psr\Http\Client\ClientInterface::class, ClientImplementation::class);
$container->setAlias(Http\Message\RequestFactory::class, FactoryImplementation::class);

php vendor/bin/thunder