PHP Класс AsyncPHP\Doorman\Manager\ProcessManager

Наследование: implements AsyncPHP\Doorman\Manager
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$shell null | AsyncPHP\Doorman\Shell

Открытые методы

Метод Описание
__destruct ( )
addRule ( AsyncPHP\Doorman\Rule $rule )
addTask ( AsyncPHP\Doorman\Task $task )
getBinary ( ) : string Gets the path of the PHP runtime.
getLogPath ( ) : null | string
getRules ( ) : AsyncPHP\Doorman\Rules Gets or creates a new Rules instance.
getRunning ( ) : array Get a list of the running tasks.
getShell ( ) : AsyncPHP\Doorman\Shell Gets or creates a Shell instance.
getWaiting ( ) : array Get a list of the waiting tasks.
getWorker ( ) : string Gets the path of the worker script.
removeRule ( AsyncPHP\Doorman\Rule $rule )
setBinary ( string $binary )
setLogPath ( string $logPath )
setRules ( AsyncPHP\Doorman\Rules $rules )
setShell ( AsyncPHP\Doorman\Shell $shell )
setWorker ( string $worker )
tick ( ) : boolean

Приватные методы

Метод Описание
canRemoveTask ( AsyncPHP\Doorman\Task $task ) : boolean Checks whether a task can be removed from the list of running processes.
canRunTask ( AsyncPHP\Doorman\Task $task ) : boolean Checks whether a new task can be run.
getProfileForProcesses ( AsyncPHP\Doorman\Task $task, array $processes ) : AsyncPHP\Doorman\Profile Gets the load profile related to a task.
getStatsForProcesses ( array $processes ) : array Gets processor and memory stats for a list of processes.
getStdErr ( ) : string Gets the path to write stderr to.
getStdOut ( ) : string Gets the path to write stdout to.
getTaskString ( AsyncPHP\Doorman\Task $task ) : string Gets a string representation of a task, to pass to the worker script.
isTaskCancelled ( AsyncPHP\Doorman\Task $task ) : boolean Check if the given task is cancelled.
isTaskExpired ( AsyncPHP\Doorman\Task $task ) : boolean Check if the given task is expired
killTask ( AsyncPHP\Doorman\Task $task ) : boolean Revoke any background processes attached to this task.
newProfile ( ) : AsyncPHP\Doorman\Profile Creates a new Profile instance.
newRules ( ) : AsyncPHP\Doorman\Rules Creates a new Rules instance.
newShell ( ) : AsyncPHP\Doorman\Shell Creates a new Shell instance.
stopSiblingTasks ( AsyncPHP\Doorman\Task $task ) Stops sibling processes of a task.

Описание методов

__destruct() публичный метод

public __destruct ( )

addRule() публичный метод

public addRule ( AsyncPHP\Doorman\Rule $rule )
$rule AsyncPHP\Doorman\Rule

addTask() публичный метод

public addTask ( AsyncPHP\Doorman\Task $task )
$task AsyncPHP\Doorman\Task

getBinary() публичный метод

Gets the path of the PHP runtime.
public getBinary ( ) : string
Результат string

getLogPath() публичный метод

public getLogPath ( ) : null | string
Результат null | string

getRules() публичный метод

Gets or creates a new Rules instance.
public getRules ( ) : AsyncPHP\Doorman\Rules
Результат AsyncPHP\Doorman\Rules

getRunning() публичный метод

Get a list of the running tasks.
public getRunning ( ) : array
Результат array

getShell() публичный метод

Gets or creates a Shell instance.
public getShell ( ) : AsyncPHP\Doorman\Shell
Результат AsyncPHP\Doorman\Shell

getWaiting() публичный метод

Get a list of the waiting tasks.
public getWaiting ( ) : array
Результат array

getWorker() публичный метод

Gets the path of the worker script.
public getWorker ( ) : string
Результат string

removeRule() публичный метод

public removeRule ( AsyncPHP\Doorman\Rule $rule )
$rule AsyncPHP\Doorman\Rule

setBinary() публичный метод

public setBinary ( string $binary )
$binary string

setLogPath() публичный метод

public setLogPath ( string $logPath )
$logPath string

setRules() публичный метод

public setRules ( AsyncPHP\Doorman\Rules $rules )
$rules AsyncPHP\Doorman\Rules

setShell() публичный метод

public setShell ( AsyncPHP\Doorman\Shell $shell )
$shell AsyncPHP\Doorman\Shell

setWorker() публичный метод

public setWorker ( string $worker )
$worker string

tick() публичный метод

public tick ( ) : boolean
Результат boolean

Описание свойств

$shell защищенное свойство

protected null|Shell,AsyncPHP\Doorman $shell
Результат null | AsyncPHP\Doorman\Shell