PHP code example of micseres / micro-service-reactor

1. Go to this page and download the library: Download micseres/micro-service-reactor 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/ */

    

micseres / micro-service-reactor example snippets


    protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $this->input  = $input;
        $this->output = $output;
        
        $this->microServiceReactor = new MicroServiceReactor('127.0.0.1', 9001, 'passport', 1000);

        $this->microServiceReactor->setController([$this, 'generate']);
        $this->microServiceReactor->setLogger([$this, 'log']);

        $this->microServiceReactor->process();
    }