PHP code example of sinevia / php-library-sqldb-tasks
1. Go to this page and download the library: Download sinevia/php-library-sqldb-tasks 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/ */
sinevia / php-library-sqldb-tasks example snippets
$task = \Sinevia\Tasks\Task::queue('\App\Tasks\PaypalOrderTask', $parametersArray);
if ($task == null){
logger()->error('Task "\App\Tasks\PaypalOrderTask" failed to be created', $parametersArray);
return false;
}
$result = \Sinevia\Tasks\Queue::processQueuedTaskById($task->get('Id'));
return $result;
class HelloWorldTask extends \Sinevia\Tasks\BaseHandler {
function handle(array $parameters){
$this->queuedTask->addDetails('Adding Hello World to Output Parameters');
$this->queuedTask->setOutputKey('hello','world');
return true;
}
}