1. Go to this page and download the library: Download zenaton/zenaton-php 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/ */
use Zenaton\Interfaces\TaskInterface;
use Zenaton\Traits\Zenatonable;
class HelloWorldTask implements TaskInterface
{
public function handle()
{
echo "Hello World\n";
return mt_rand(0, 1);
}
}
(new HelloWorldTask())->dispatch();
use Zenaton\Interfaces\WorkflowInterface;
use Zenaton\Traits\Zenatonable;
class MyFirstWorkflow implements WorkflowInterface
{
use Zenatonable;
public function handle()
{
$n = (new HelloWorldTask())->execute();
if ($n > 0) {
(new FinalTask())->execute();
}
}
}
(new MyFirstWorkflow())->dispatch();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.