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