public function __construct(array $configs = []) { $this->setConfigs($configs); if (!empty($configs)) { $this->init(); } }