PHP code example of ecommit / messenger-supervisor-bundle
1. Go to this page and download the library: Download ecommit/messenger-supervisor-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/ */
ecommit / messenger-supervisor-bundle example snippets
return [
//...
Ecommit\MessengerSupervisorBundle\EcommitMessengerSupervisorBundle::class => ['all' => true],
//...
];
use Ecommit\MessengerSupervisorBundle\Supervisor\Supervisor;
class MyClass
{
protected $supervisor;
public function __construct(Supervisor $supervisor) //Supervisor service is injected
{
$this->supervisor = $supervisor;
}
public function myMethod(): void
{
//$this->supervisor->startProgram('program_async');
//$this->supervisor->stopProgram('program_async');
//$status = $this->supervisor->getProgramsStatus(['program_async']);
}
}