PHP 클래스 UrbanIndo\Yii2\Queue\Web\WorkerController

The motivation comes from the HHVM limitation for running PHP terminal script.
저자: Petra Barus ([email protected])
저자: Adinata ([email protected])
상속: extends yii\web\Controller
파일 보기 프로젝트 열기: urbanindo/yii2-queue

공개 프로퍼티들

프로퍼티 타입 설명
$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.

공개 메소드들

메소드 설명
actionRun ( ) : mixed Run a task by request.
actionRunTask ( ) Run a task without going to queue.

보호된 메소드들

메소드 설명
executeJob ( Queue $queue, UrbanIndo\Yii2\Queue\Job $job ) : array
getDummyModule ( ) : string
getQueue ( ) : Queue Returns the queue component.

비공개 메소드들

메소드 설명
getComponentParamFromRequest ( ) : string

메소드 상세

actionRun() 공개 메소드

Run a task by request.
public actionRun ( ) : mixed
리턴 mixed

actionRunTask() 공개 메소드

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

executeJob() 보호된 메소드

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.
리턴 array

getDummyModule() 보호된 메소드

protected getDummyModule ( ) : string
리턴 string Module name.

getQueue() 보호된 메소드

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

프로퍼티 상세

$defaultQueue 공개적으로 프로퍼티

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

$enableCsrfValidation 공개적으로 프로퍼티

public bool $enableCsrfValidation
리턴 boolean

$queueParamName 공개적으로 프로퍼티

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
리턴 string