/** * * @return Config */ public static function getInstance() { if (self::$_instance === null) { self::$_instance = new self(); } return self::$_instance; }
/** * * @return \ifirma\ApiManager */ public function setConfiguration() { global $loader, $registry; $loader->model('setting/setting'); $settings = $registry->get('model_setting_setting'); $ifi_invoice = $settings->getSetting('ifi_invoice'); ConnectorConfig::getInstance()->{ConnectorConfig::API_LOGIN} = $ifi_invoice[ModelModuleInvoiceMap::API_LOGIN]; ConnectorConfig::getInstance()->{ConnectorConfig::API_KEY_BILL} = $ifi_invoice[ModelModuleInvoiceMap::API_KEY_BILL]; ConnectorConfig::getInstance()->{ConnectorConfig::API_KEY_INVOICE} = $ifi_invoice[ModelModuleInvoiceMap::API_KEY_INVOICE]; ConnectorConfig::getInstance()->{ConnectorConfig::API_KEY_SUBSCRIBER} = $ifi_invoice[ModelModuleInvoiceMap::API_KEY_SUBSCRIBER]; return $this; }
/** * @return Conf */ protected function _getConfig() { return ConnectorConfig::getInstance(); }