PHP code example of innmind / installation-monitor

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

    

innmind / installation-monitor example snippets


use function Innmind\InstallationMonitor\bootstrap;
use Innmind\InstallationMonitor\Event;
use Innmind\Immutable\{
    Map,
    Sequence,
};

$client = bootstrap()['client']['ipc']();
$client->send(
    new Event(
        new Event\Name('foo'),
        $payload = Map::of('string', 'scalar|array')
    ),
    new Event(
        new Event\Name('bar'),
        $payload = Map::of('string', 'scalar|array')
    )
    // etc...
);
// or
$client->events(); // Sequence<Event> all the events recorded by the server