PHP code example of technoly / neoseventstore-cycleadapter

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

    

technoly / neoseventstore-cycleadapter example snippets


use Cycle\Database;
use Cycle\Database\Config;
use Technoly\NeosEventStore\CycleAdapter\CycleEventStore;

$dbConfig = new Config\DatabaseConfig([
    // your database configuration
]);
$dbal = new Database\DatabaseManager($dbConfig);

$eventTableName = 'some_namespace_events';
$eventStore = new CycleEventStore($dbal->database('default'), $eventTableName);