本文整理匯總了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);
}