<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
connectholland / tactician-scheduler-plugin example snippets
// create your other middleware
$middleware[] = new SchedulerMiddleware(new FileBasedScheduler($pathWhereTheSchedulerMayKeepItsFiles) );
// create your other middleware
$commandbus = new CommandBus($middleware);
class SayHappyNewYear extends AbstractScheduledCommand
{
private $message;
public function __construct($message)
{
$this->message = $message;
}
public function getMessage()
{
return $this->message;
}
}
$myScheduledCommand = new SayHappyNewYear('Happy New Year');
$myScheduledCommand->setTimestamp(strtotime('2016-01-01 0:00:00') );
$myCommandBus->handle($myScheduledCommand);
// setup any environment you need
// create your other middleware
$middleware[] = new SchedulerMiddleware(new FileBasedScheduler($pathWhereTheSchedulerMayKeepItsFiles) );
// create your other middleware
$commandbus = new CommandBus($middleware);
return $commandbus;