本文整理汇总了PHP中Daemon::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Daemon::__construct方法的具体用法?PHP Daemon::__construct怎么用?PHP Daemon::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Daemon
的用法示例。
在下文中一共展示了Daemon::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function __construct()
{
$this->params = $this->getArgs();
if (isset($this->params['interval'])) {
$this->job_scheduling_interval = $this->params['interval'];
}
if (isset($this->params['max_workers'])) {
$this->max_workers = $this->params['max_workers'];
}
if (isset($this->params['pid_file_location'])) {
$this->pidFileLocation = $this->params['pid_file_location'];
}
if (isset($this->params['uid'])) {
$this->userID = $this->params['uid'];
}
if (isset($this->params['gid'])) {
$this->groupID = $this->params['gid'];
}
if (isset($this->params['pid_file_location'])) {
$this->pidFileLocation = $this->params['pid_file_location'];
}
$s = owa_coreAPI::serviceSingleton();
$this->jobs = $s->getMap('backgound_jobs');
$this->eq = owa_coreAPI::getEventDispatch();
return parent::__construct();
}
示例2:
function __construct($id = null, $daemonize = true, $threads = 1)
{
parent::__construct($daemonize);
if ($id) {
$this->set_id($id);
}
$this->threads = $threads;
}
示例3:
/**
* Constructor
*
* @param string $id the name/id of this daemon
* @param int $interval sleep this long before doing everything again
* @param int $max_children maximum number of child processes at a time
* @param boolean $debug debug output flag
*
* @return void
*
**/
function __construct($id = null, $interval = 60, $max_children = 2, $debug = null)
{
parent::__construct(true);
// daemonize
$this->_interval = $interval;
$this->_max_children = $max_children;
$this->_debug = $debug;
if (isset($id)) {
$this->set_id($id);
}
}
示例4:
/**
* Airplay constructor.
*/
function __construct()
{
parent::__construct('sshd', 'airplay');
}
示例5:
function __construct()
{
parent::__construct('pptpd', 'pptpd');
}
示例6:
/**
* Server constructor.
*/
function __construct()
{
parent::__construct('apcupsd', 'apcups');
}
示例7: BackupDaemon
/**
* Конструктор
* @param Config $config Настройки демона
* @param Logger $log Объект логирования
* @param type $inDebug Режим дебага. В нем время летит очень быстро, а тяжелые операции становятся легкими.
*/
public function BackupDaemon(Config $config, Logger $log, $debugFlag = false)
{
parent::__construct($log, $debugFlag);
$this->config = $config;
}
示例8: __construct
public function __construct($name = "kiki-maild", $logFacility = LOG_DAEMON)
{
parent::__construct($name, $logFacility);
}