PageGenerationTaskStartHandler
extends PageGenerationHandlerBase
in package
implements
TaskStartHandlerInterface
Table of Contents
Interfaces
- TaskStartHandlerInterface
- プロセス起動前に呼ばれるハンドラのインターフェース。 false を返すとそのタスクは起動されずスキップされる。
Properties
Methods
- __construct() : mixed
- extractStatusCodeFromStderr() : int
- stderr 文字列からHTTPステータスコードを抽出する - 末尾にある「数字だけの行」を優先 - 見つからなければ 200 を返す
- handle() : bool
- タスクのプロセスを起動する直前に呼ばれる。
Properties
$listener read-only
protected
PageGenerationListenerInterface
$listener
Methods
__construct()
public
__construct(PageGenerationListenerInterface $listener) : mixed
Parameters
- $listener : PageGenerationListenerInterface
extractStatusCodeFromStderr()
stderr 文字列からHTTPステータスコードを抽出する - 末尾にある「数字だけの行」を優先 - 見つからなければ 200 を返す
public
extractStatusCodeFromStderr(string $stderr) : int
Parameters
- $stderr : string
Return values
inthandle()
タスクのプロセスを起動する直前に呼ばれる。
public
handle(ProcessTask $task) : bool
Parameters
- $task : ProcessTask
-
これから起動するタスク
Return values
bool —true の場合は起動する。false の場合は起動せずスキップする