mirror of
https://github.com/idanoo/laravel-resque.git
synced 2025-07-02 19:42:15 +00:00
initial commit
This commit is contained in:
parent
81d0771154
commit
c563d0e4ae
7 changed files with 189 additions and 0 deletions
47
src/Job.php
Normal file
47
src/Job.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
namespace Hlgrrnhrdt\Resque;
|
||||
|
||||
/**
|
||||
* Job
|
||||
*
|
||||
* @author Holger Reinhardt <hlgrrnhrdt@gmail.com>
|
||||
*/
|
||||
abstract class Job
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $queue = 'default';
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $arguments = [];
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function queue()
|
||||
{
|
||||
return $this->queue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function arguments()
|
||||
{
|
||||
return $this->arguments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $queue
|
||||
*
|
||||
* @return Job
|
||||
*/
|
||||
public function onQueue($queue)
|
||||
{
|
||||
$this->queue = $queue;
|
||||
return $this;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue