PHP Class UrbanIndo\Yii2\Queue\Strategies\Strategy

Since: 2015.02.25
Author: Petra Barus ([email protected])
Inheritance: extends yii\base\Object
Show file Open project: urbanindo/yii2-queue Class Usage Examples

Protected Properties

Property Type Description
$_queue UrbanIndo\Yii2\Queue\MultipleQueue Stores the queue.

Public Methods

Method Description
delete ( UrbanIndo\Yii2\Queue\Job $job ) : boolean Delete the job from the queue.
fetch ( ) : UrbanIndo\Yii2\Queue\Job | boolean Returns the job.
setQueue ( MultipleQueue $queue ) : void Sets the queue.

Protected Methods

Method Description
getJobFromQueues ( ) : mixed Implement this for the strategy of getting job from the queue.

Method Details

delete() public method

Delete the job from the queue.
public delete ( UrbanIndo\Yii2\Queue\Job $job ) : boolean
$job UrbanIndo\Yii2\Queue\Job The job.
return boolean whether the operation succeed.

fetch() public method

Returns the job.
public fetch ( ) : UrbanIndo\Yii2\Queue\Job | boolean
return UrbanIndo\Yii2\Queue\Job | boolean The job or false if not found.

getJobFromQueues() abstract protected method

Implement this for the strategy of getting job from the queue.
abstract protected getJobFromQueues ( ) : mixed
return mixed tuple of job and the queue index.

setQueue() public method

Sets the queue.
public setQueue ( MultipleQueue $queue ) : void
$queue UrbanIndo\Yii2\Queue\Queues\MultipleQueue The queue.
return void

Property Details

$_queue protected property

Stores the queue.
protected MultipleQueue,UrbanIndo\Yii2\Queue $_queue
return UrbanIndo\Yii2\Queue\MultipleQueue