本文整理匯總了PHP中Daemon::addDefaultSettings方法的典型用法代碼示例。如果您正苦於以下問題:PHP Daemon::addDefaultSettings方法的具體用法?PHP Daemon::addDefaultSettings怎麽用?PHP Daemon::addDefaultSettings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Daemon
的用法示例。
在下文中一共展示了Daemon::addDefaultSettings方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'enable' => 0, 'mod' . $this->modname . 'ipcpath' => '/tmp/WsOverComet-%s.sock'));
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
$this->wss = Daemon::$appResolver->getInstanceByAppName('WebSocketServer');
}
}
示例2: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'upserver' => '127.0.0.1:3306', 'mod' . $this->modname . 'listen' => 'tcp://0.0.0.0', 'mod' . $this->modname . 'listenport' => 3307, 'mod' . $this->modname . 'protologging' => 0, 'mod' . $this->modname . 'enable' => 0));
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$this->bindSockets(Daemon::$settings['mod' . $this->modname . 'listen'], Daemon::$settings['mod' . $this->modname . 'listenport']);
}
}
示例3: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'listen' => 'tcp://0.0.0.0', 'mod' . $this->modname . 'listenport' => 844, 'mod' . $this->modname . 'enable' => 0));
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$this->bindSockets(Daemon::$settings['mod' . $this->modname . 'listen'], Daemon::$settings['mod' . $this->modname . 'listenport']);
}
}
示例4: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'server' => 'pg://root@127.0.0.1', 'mod' . $this->modname . 'port' => 5432, 'mod' . $this->modname . 'protologging' => 0, 'mod' . $this->modname . 'enable' => 0));
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$this->ready = TRUE;
}
}
示例5: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'listen' => 'tcp://0.0.0.0', 'mod' . $this->modname . 'listenport' => 833, 'mod' . $this->modname . 'allowedclients' => '127.0.0.1', 'mod' . $this->modname . 'enable' => 0));
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$this->allowedClients = explode(',', Daemon::$settings['mod' . $this->modname . 'allowedclients']);
$this->bindSockets(Daemon::$settings['mod' . $this->modname . 'listen'], Daemon::$settings['mod' . $this->modname . 'listenport']);
}
}
示例6: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'listen' => 'tcp://0.0.0.0', 'mod' . $this->modname . 'listen-port' => 80, 'mod' . $this->modname . 'log-events' => 0, 'mod' . $this->modname . 'log-queue' => 0, 'mod' . $this->modname . 'send-file' => 0, 'mod' . $this->modname . 'send-file-dir' => '/dev/shm', 'mod' . $this->modname . 'send-file-prefix' => 'http-', 'mod' . $this->modname . 'send-file-onlybycommand' => 0, 'mod' . $this->modname . 'keepalive' => '0s', 'mod' . $this->modname . 'enable' => 0));
Daemon::$parsedSettings['mod' . $this->modname . 'keepalive'] = Daemon::parseTime(Daemon::$settings['mod' . $this->modname . 'keepalive']);
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$this->bindSockets(Daemon::$settings['mod' . $this->modname . 'listen'], Daemon::$settings['mod' . $this->modname . 'listenport']);
}
}
示例7: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'listen' => 'tcp://0.0.0.0', 'mod' . $this->modname . 'listenport' => 843, 'mod' . $this->modname . 'file' => Daemon::$dir . '/conf/crossdomain.xml', 'mod' . $this->modname . 'enable' => 0));
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$this->bindSockets(Daemon::$settings['mod' . $this->modname . 'listen'], Daemon::$settings['mod' . $this->modname . 'listenport']);
$this->update();
}
}
示例8: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'listen' => 'tcp://127.0.0.1,unix:/tmp/phpdaemon.fcgi.sock', 'mod' . $this->modname . 'listen-port' => 9000, 'mod' . $this->modname . 'allowed-clients' => '127.0.0.1', 'mod' . $this->modname . 'log-records' => 0, 'mod' . $this->modname . 'log-records-miss' => 0, 'mod' . $this->modname . 'log-events' => 0, 'mod' . $this->modname . 'log-queue' => 0, 'mod' . $this->modname . 'send-file' => 0, 'mod' . $this->modname . 'send-file-dir' => '/dev/shm', 'mod' . $this->modname . 'send-file-prefix' => 'fcgi-', 'mod' . $this->modname . 'send-file-onlybycommand' => 0, 'mod' . $this->modname . 'keepalive' => '0s', 'mod' . $this->modname . 'enable' => 0));
Daemon::$parsedSettings['mod' . $this->modname . 'keepalive'] = Daemon::parseTime(Daemon::$settings['mod' . $this->modname . 'keepalive']);
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$this->allowedClients = explode(',', Daemon::$settings['mod' . $this->modname . 'allowedclients']);
$this->bindSockets(Daemon::$settings['mod' . $this->modname . 'listen'], Daemon::$settings['mod' . $this->modname . 'listenport']);
}
}
示例9: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'listen' => 'tcpstream://127.0.0.1:844', 'mod' . $this->modname . 'enable' => 0));
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
require_once Daemon::$dir . '/lib/asyncRTEPclient.class.php';
$this->client = new AsyncRTEPclient();
$this->client->addServer(Daemon::$settings[$k = 'mod' . $this->modname . 'addr']);
$this->client->trace = TRUE;
}
}
示例10: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'dbname' => 'chat', 'mod' . $this->modname . 'adminpassword' => '', 'mod' . $this->modname . 'enable' => 0));
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$this->db = Daemon::$appResolver->getInstanceByAppName('MongoClient');
$this->dbname =& Daemon::$settings[$k = 'mod' . $this->modname . 'dbname'];
$this->tags = array();
$this->minMsgInterval = 1;
}
}
示例11: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'enable' => 0));
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
$this->LockClient = Daemon::$appResolver->getInstanceByAppName('LockClient');
Daemon::log(__CLASS__ . ' up.');
$this->db = Daemon::$appResolver->getInstanceByAppName('MongoClient');
$this->cache = Daemon::$appResolver->getInstanceByAppName('MemcacheClient');
$this->RTEPClient = Daemon::$appResolver->getInstanceByAppName('RTEPClient');
}
}
示例12: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'servers' => '127.0.0.1', 'mod' . $this->modname . 'port' => 11211, 'mod' . $this->modname . 'prefix' => '', 'mod' . $this->modname . 'enable' => 0));
$this->prefix =& Daemon::$settings['mod' . $this->modname . 'prefix'];
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$servers = explode(',', Daemon::$settings['mod' . $this->modname . 'servers']);
foreach ($servers as $s) {
$e = explode(':', $s);
$this->addServer($e[0], isset($e[1]) ? $e[1] : NULL);
}
}
}
示例13: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'servers' => '127.0.0.1', 'mod' . $this->modname . 'port' => 27017, 'mod' . $this->modname . 'enable' => 0));
$this->cache = Daemon::$appResolver->getInstanceByAppName('MemcacheClient');
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$servers = explode(',', Daemon::$settings['mod' . $this->modname . 'servers']);
foreach ($servers as $s) {
$e = explode(':', $s);
$this->addServer($e[0], isset($e[1]) ? $e[1] : NULL);
}
}
}
示例14: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'servers' => '127.0.0.1', 'mod' . $this->modname . 'port' => 4730, 'mod' . $this->modname . 'enable' => 0));
if (!isset(Daemon::$settings[$k = 'mod' . $this->modname . 'enable'])) {
Daemon::$settings[$k] = 0;
}
if (Daemon::$settings['mod' . $this->modname . 'enable']) {
Daemon::log(__CLASS__ . ' up.');
$this->client = new GearmanClient();
$this->worker = new GearmanWorker();
foreach (explode(',', Daemon::$settings['mod' . $this->modname . 'servers']) as $address) {
$e = explode(':', $address, 2);
$this->client->addServer($e[0], isset($e[1]) ? $e[1] : Daemon::$settings['mod' . $this->modname . 'port']);
$this->worker->addServer($e[0], isset($e[1]) ? $e[1] : Daemon::$settings['mod' . $this->modname . 'port']);
}
$this->interval = $this->pushRequest(new GearmanNodeInterval($this, $this));
}
}
示例15: init
public function init()
{
Daemon::addDefaultSettings(array('mod' . $this->modname . 'indexfiles' => 'index.html/index.htm'));
$this->indexFiles = explode('/', Daemon::$settings['mod' . $this->modname . 'indexfiles']);
}