PHP Class PHPDaemon\Config\Object

Author: Zorin Vasily ([email protected])
Inheritance: implements ArrayAccess, use trait PHPDaemon\Traits\ClassWatchdog
显示文件 Open project: kakserpom/phpdaemon Class Usage Examples

Public Properties

Property Type Description
$addincludepath string | PHPDaemon\Config\Entry\Generic Additional include path
$autogc integer | PHPDaemon\Config\Entry\Number Automatic garbage collector, number of iterations between GC call
$autoreimport boolean | PHPDaemon\Config\Entry\Generic Try to import updated code (runkit required)
$autoreload time Autoreload interval. Time interval between checks.
$chroot string | PHPDaemon\Config\Entry\Generic Chroot
$configfile string | PHPDaemon\Config\Entry\ConfigFile Config file
$cwd string Current directory
$defaultns path Default namespace
$defaultpidfile path Default PID file
$eioenabled boolean EIO enabled?
$eiosetmaxidle time EIO maximum idle time
$eiosetmaxparallel integer | PHPDaemon\Config\Entry\Number EIO maximum parallel threads
$eiosetmaxpollreqs integer | PHPDaemon\Config\Entry\Number EIO maximum poll requests
$eiosetmaxpolltime time EIO maximum poll time
$eiosetminparallel integer | PHPDaemon\Config\Entry\Number EIO minimum parallel threads
$group string | PHPDaemon\Config\Entry\Generic System group (setgid)
$ipcthreadpriority integer IPC thread priority
$lambdacachecapwindow integer Lambda cache cap window
$lambdacachemaxsize integer Lambda cache size
$lambdacachettl integer Lambda cache ttl
$lastRevision integer
$locale string | PHPDaemon\Config\Entry\Generic Comma-separated list of locales
$logerrors boolean Log errors?
$logformat string Log format
$logging boolean Logging?
$logsignals boolean Log signals?
$logstorage boolean | PHPDaemon\Config\Entry\Generic Log storage
$logworkersetstate boolean Log Worker->setState() ?
$masterpriority integer Master thread priority
$maxidle time Maximum idle time
$maxmemoryusage size Maximum memory usage
$maxrequests integer | PHPDaemon\Config\Entry\Number Max. requests before worker restart
$maxspareworkers integer | PHPDaemon\Config\Entry\Number Maximum number of spare workes
$maxworkers integer | PHPDaemon\Config\Entry\Number Maximum number of workers
$minspareworkers integer | PHPDaemon\Config\Entry\Number Minimum number of spare workes
$minworkers integer | PHPDaemon\Config\Entry\Number Minimum number of workers
$mpmdelay time Multi-Process Manager delay
$obfilterauto boolean IPC thread priority
$path string | PHPDaemon\Config\Entry\Generic Application resolver
$pidfile string | PHPDaemon\Config\Entry\Generic PID file
$restricterrorcontrol boolean Restrict usage of error-control functions (like @ operator), useful in debugging
$startworkers integer | PHPDaemon\Config\Entry\Number Start workers
$throwexceptiononshutdown boolean Throw exception on shutdown?
$user string | PHPDaemon\Config\Entry\Generic System user (setuid)
$verbosetty boolean Do not close STDOUT and STDERR pipes and send log messages there
$workerpriority integer Worker thread priority

Public Methods

Method Description
__construct ( ) : object Constructor
getRealPropertyName ( $prop ) : string Get real property name
loadCmdLineArgs ( $settings ) : boolean Imports parameters from command line args
loadFile ( $path ) : boolean Load config file
offsetExists ( $prop ) : boolean Checks if property exists
offsetGet ( $prop ) : mixed Get property by name
offsetSet ( $prop, $value ) : void Set property
offsetUnset ( $prop ) : void Unset property
parseCfgUri ( $uri, $source = null ) : boolean Checks if property exists
renameSection ( string $old, string $new, booelan $log = false ) : void Renames section

Protected Methods

Method Description
onLoad ( ) : void Called when config is loaded

Method Details

__construct() public method

Constructor
public __construct ( ) : object
return object

getRealPropertyName() public method

Get real property name
public getRealPropertyName ( $prop ) : string
return string Real property name

loadCmdLineArgs() public static method

Imports parameters from command line args
public static loadCmdLineArgs ( $settings ) : boolean
return boolean - Success.

loadFile() public method

Load config file
public loadFile ( $path ) : boolean
return boolean Success

offsetExists() public method

Checks if property exists
public offsetExists ( $prop ) : boolean
return boolean Exists?

offsetGet() public method

Get property by name
public offsetGet ( $prop ) : mixed
return mixed

offsetSet() public method

Set property
public offsetSet ( $prop, $value ) : void
return void

offsetUnset() public method

Unset property
public offsetUnset ( $prop ) : void
return void

onLoad() protected method

Called when config is loaded
protected onLoad ( ) : void
return void

parseCfgUri() public static method

Checks if property exists
public static parseCfgUri ( $uri, $source = null ) : boolean
return boolean Exists?

renameSection() public method

Renames section
public renameSection ( string $old, string $new, booelan $log = false ) : void
$old string
$new string
$log booelan Log?
return void

Property Details

$addincludepath public_oe property

Additional include path
public string|Generic,PHPDaemon\Config\Entry $addincludepath
return string | PHPDaemon\Config\Entry\Generic

$autogc public_oe property

Automatic garbage collector, number of iterations between GC call
public int|Number,PHPDaemon\Config\Entry $autogc
return integer | PHPDaemon\Config\Entry\Number

$autoreimport public_oe property

Try to import updated code (runkit required)
public bool|Generic,PHPDaemon\Config\Entry $autoreimport
return boolean | PHPDaemon\Config\Entry\Generic

$autoreload public_oe property

Autoreload interval. Time interval between checks.
public time $autoreload
return time

$chroot public_oe property

Chroot
public string|Generic,PHPDaemon\Config\Entry $chroot
return string | PHPDaemon\Config\Entry\Generic

$configfile public_oe property

Config file
public string|ConfigFile,PHPDaemon\Config\Entry $configfile
return string | PHPDaemon\Config\Entry\ConfigFile

$cwd public_oe property

Current directory
public string $cwd
return string

$defaultns public_oe property

Default namespace
public path $defaultns
return path

$defaultpidfile public_oe property

Default PID file
public path $defaultpidfile
return path

$eioenabled public_oe property

EIO enabled?
public bool $eioenabled
return boolean

$eiosetmaxidle public_oe property

EIO maximum idle time
public time $eiosetmaxidle
return time

$eiosetmaxparallel public_oe property

EIO maximum parallel threads
public int|Number,PHPDaemon\Config\Entry $eiosetmaxparallel
return integer | PHPDaemon\Config\Entry\Number

$eiosetmaxpollreqs public_oe property

EIO maximum poll requests
public int|Number,PHPDaemon\Config\Entry $eiosetmaxpollreqs
return integer | PHPDaemon\Config\Entry\Number

$eiosetmaxpolltime public_oe property

EIO maximum poll time
public time $eiosetmaxpolltime
return time

$eiosetminparallel public_oe property

EIO minimum parallel threads
public int|Number,PHPDaemon\Config\Entry $eiosetminparallel
return integer | PHPDaemon\Config\Entry\Number

$group public_oe property

System group (setgid)
public string|Generic,PHPDaemon\Config\Entry $group
return string | PHPDaemon\Config\Entry\Generic

$ipcthreadpriority public_oe property

IPC thread priority
public int $ipcthreadpriority
return integer

$lambdacachecapwindow public_oe property

Lambda cache cap window
public int $lambdacachecapwindow
return integer

$lambdacachemaxsize public_oe property

Lambda cache size
public int $lambdacachemaxsize
return integer

$lambdacachettl public_oe property

Lambda cache ttl
public int $lambdacachettl
return integer

$lastRevision public_oe static_oe property

public static int $lastRevision
return integer

$locale public_oe property

Comma-separated list of locales
public string|Generic,PHPDaemon\Config\Entry $locale
return string | PHPDaemon\Config\Entry\Generic

$logerrors public_oe property

Log errors?
public bool $logerrors
return boolean

$logformat public_oe property

Log format
public string $logformat
return string

$logging public_oe property

Logging?
public bool $logging
return boolean

$logsignals public_oe property

Log signals?
public bool $logsignals
return boolean

$logstorage public_oe property

Log storage
public bool|Generic,PHPDaemon\Config\Entry $logstorage
return boolean | PHPDaemon\Config\Entry\Generic

$logworkersetstate public_oe property

Log Worker->setState() ?
public bool $logworkersetstate
return boolean

$masterpriority public_oe property

Master thread priority
public int $masterpriority
return integer

$maxidle public_oe property

Maximum idle time
public time $maxidle
return time

$maxmemoryusage public_oe property

Maximum memory usage
public size $maxmemoryusage
return size

$maxrequests public_oe property

Max. requests before worker restart
public int|Number,PHPDaemon\Config\Entry $maxrequests
return integer | PHPDaemon\Config\Entry\Number

$maxspareworkers public_oe property

Maximum number of spare workes
public int|Number,PHPDaemon\Config\Entry $maxspareworkers
return integer | PHPDaemon\Config\Entry\Number

$maxworkers public_oe property

Maximum number of workers
public int|Number,PHPDaemon\Config\Entry $maxworkers
return integer | PHPDaemon\Config\Entry\Number

$minspareworkers public_oe property

Minimum number of spare workes
public int|Number,PHPDaemon\Config\Entry $minspareworkers
return integer | PHPDaemon\Config\Entry\Number

$minworkers public_oe property

Minimum number of workers
public int|Number,PHPDaemon\Config\Entry $minworkers
return integer | PHPDaemon\Config\Entry\Number

$mpmdelay public_oe property

Multi-Process Manager delay
public time $mpmdelay
return time

$obfilterauto public_oe property

IPC thread priority
public bool $obfilterauto
return boolean

$path public_oe property

Application resolver
public string|Generic,PHPDaemon\Config\Entry $path
return string | PHPDaemon\Config\Entry\Generic

$pidfile public_oe property

PID file
public string|Generic,PHPDaemon\Config\Entry $pidfile
return string | PHPDaemon\Config\Entry\Generic

$restricterrorcontrol public_oe property

Restrict usage of error-control functions (like @ operator), useful in debugging
public bool $restricterrorcontrol
return boolean

$startworkers public_oe property

Start workers
public int|Number,PHPDaemon\Config\Entry $startworkers
return integer | PHPDaemon\Config\Entry\Number

$throwexceptiononshutdown public_oe property

Throw exception on shutdown?
public bool $throwexceptiononshutdown
return boolean

$user public_oe property

System user (setuid)
public string|Generic,PHPDaemon\Config\Entry $user
return string | PHPDaemon\Config\Entry\Generic

$verbosetty public_oe property

Do not close STDOUT and STDERR pipes and send log messages there
public bool $verbosetty
return boolean

$workerpriority public_oe property

Worker thread priority
public int $workerpriority
return integer