PHP Class PHPDaemon\Core\Bootstrap

Author: Vasily Zorin ([email protected])
Inheritance: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Datei anzeigen Open project: kakserpom/phpdaemon Class Usage Examples

Protected Properties

Property Type Description
$commands array List of commands
$params array Command-line params
$pid integer Master process ID

Public Methods

Method Description
getArgs ( array $args ) : array Parses command-line arguments.
init ( $configFile = null ) : void Actions on early startup.
runworker ( ) : void Runworker.
start ( ) : void Start master.
stop ( integer $mode = 1 ) : void Stop script.

Protected Methods

Method Description
printHelp ( ) : void Print help
printUsage ( ) : void Print ussage

Method Details

getArgs() public static method

Parses command-line arguments.
public static getArgs ( array $args ) : array
$args array $_SERVER ['argv']
return array Arguments

init() public static method

Actions on early startup.
public static init ( $configFile = null ) : void
return void

printHelp() protected static method

Print help
protected static printHelp ( ) : void
return void

printUsage() protected static method

Print ussage
protected static printUsage ( ) : void
return void

runworker() public static method

Runworker.
public static runworker ( ) : void
return void

start() public static method

Start master.
public static start ( ) : void
return void

stop() public static method

Stop script.
public static stop ( integer $mode = 1 ) : void
$mode integer
return void

Property Details

$commands protected_oe static_oe property

List of commands
protected static array $commands
return array

$params protected_oe static_oe property

Command-line params
protected static array $params
return array

$pid protected_oe static_oe property

Master process ID
protected static int $pid
return integer