PHP Class UrbanIndo\Yii2\Queue\Web\WorkerController

The motivation comes from the HHVM limitation for running PHP terminal script.
Author: Petra Barus ([email protected])
Author: Adinata ([email protected])
Inheritance: extends yii\web\Controller
Afficher le fichier Open project: urbanindo/yii2-queue

Méthodes publiques

Свойство Type Description
$defaultQueue string | array The default queue component name or component configuration to use when there is no queue param sent in the request.
$enableCsrfValidation boolean
$queueParamName string This will check the parameter of the POST first. If there is no value for the param, then it will check the GET. If there is still no value, then the queue component name will use the defaultQueue.

Méthodes publiques

Méthode Description
actionRun ( ) : mixed Run a task by request.
actionRunTask ( ) Run a task without going to queue.

Méthodes protégées

Méthode Description
executeJob ( Queue $queue, UrbanIndo\Yii2\Queue\Job $job ) : array
getDummyModule ( ) : string
getQueue ( ) : Queue Returns the queue component.

Private Methods

Méthode Description
getComponentParamFromRequest ( ) : string

Method Details

actionRun() public méthode

Run a task by request.
public actionRun ( ) : mixed
Résultat mixed

actionRunTask() public méthode

This is useful to test the task controller. The route and data will be retrieved from POST data.
public actionRunTask ( )

executeJob() protected méthode

protected executeJob ( Queue $queue, UrbanIndo\Yii2\Queue\Job $job ) : array
$queue UrbanIndo\Yii2\Queue\Queue Queue the job located.
$job UrbanIndo\Yii2\Queue\Job Job to be executed.
Résultat array

getDummyModule() protected méthode

protected getDummyModule ( ) : string
Résultat string Module name.

getQueue() protected méthode

This will check if there is a queue component from.
protected getQueue ( ) : Queue
Résultat UrbanIndo\Yii2\Queue\Queue

Property Details

$defaultQueue public_oe property

The default queue component name or component configuration to use when there is no queue param sent in the request.
public string|array $defaultQueue
Résultat string | array

$enableCsrfValidation public_oe property

public bool $enableCsrfValidation
Résultat boolean

$queueParamName public_oe property

This will check the parameter of the POST first. If there is no value for the param, then it will check the GET. If there is still no value, then the queue component name will use the defaultQueue.
public string $queueParamName
Résultat string