PHP code example of dpfaffenbauer / process-manager
1. Go to this page and download the library: Download dpfaffenbauer/process-manager 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/ */
$logger = $container->get('process_manager.logger');
//Logs a emergency message
$logger->emergency($process, 'Total of 100 entries found');
//Logs a alert message
$logger->alert($process, 'Total of 100 entries found');
//Logs a critical message
$logger->critical($process, 'Total of 100 entries found');
//Logs a error message
$logger->error($process, 'Total of 100 entries found');
//Logs a warning message
$logger->warning($process, 'Total of 100 entries found');
//Logs a notice message
$logger->notice($process, 'Total of 100 entries found');
//Logs a info message
$logger->info($process, 'Total of 100 entries found');
//Logs a debug message
$logger->debug($process, 'Total of 100 entries found');
$process = $this->processRepository->find($processId);
if ($process->getStatus() == ProcessManagerBundle::STATUS_STOPPING) {
// Here goes your process stop and cleanup logic
...
$process->setStatus(ProcessManagerBundle::STATUS_STOPPED); // remember to set the status to stopped.
$process->save();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.