applyConfig() protected method

Applies config
protected applyConfig ( ) : void
return void
Beispiel #1
0
 /**
  * Applies config
  * @return void
  */
 protected function applyConfig()
 {
     parent::applyConfig();
     if (isset($this->config->servers)) {
         $servers = array_filter(array_map('trim', explode(',', $this->config->servers->value)), 'strlen');
         $this->servers = [];
         foreach ($servers as $s) {
             $this->addServer($s);
         }
     }
     if (isset($this->config->maxconnperserv)) {
         $this->maxConnPerServ = $this->config->maxconnperserv->value;
     }
 }
Beispiel #2
0
 /**
  * Applies config
  * @return void
  */
 protected function applyConfig()
 {
     parent::applyConfig();
     foreach ($this->config as $k => $v) {
         if (is_object($v) && $v instanceof \PHPDaemon\Config\Entry\Generic) {
             $v = $v->getValue();
         }
         $k = strtolower($k);
         if ($k === 'allowedclients') {
             $this->allowedClients = $v;
         }
     }
 }