laravel-resque/src/Job.php
Holger Reinhardt 9e7b3a658e Refactor
2016-07-29 18:03:41 +02:00

63 lines
852 B
PHP

<?php
namespace Hlgrrnhrdt\Resque;
/**
* Job
*
* @author Holger Reinhardt <hlgrrnhrdt@gmail.com>
*/
abstract class Job
{
/**
* @var \Resque_Job
*/
public $job;
/**
* @var string
*/
public $queue = 'default';
/**
* @var array
*/
public $args = [];
/**
* @return mixed
*/
public function queue()
{
return $this->queue;
}
/**
* @return array
*/
public function arguments()
{
return $this->args;
}
/**
* @return string
*/
public function name()
{
return \get_class($this);
}
/**
* @param string $queue
*
* @return Job
*/
public function onQueue($queue)
{
$this->queue = $queue;
return $this;
}
abstract public function perform();
}