Пример #1
0
 public function init()
 {
     parent::init();
     foreach ($this->targets as $name => $target) {
         if (!$target instanceof Target) {
             $this->targets[$name] = Ping::createObject($target);
         }
     }
 }
Пример #2
0
 /**
  * Initializes the logger by registering [[flush()]] as a shutdown function.
  */
 public function init()
 {
     parent::init();
     register_shutdown_function([$this, 'flush'], true);
 }