Beispiel #1
0
 protected function _getConfig($key, $default)
 {
     if ($this->_config === null) {
         throw new \Exception("You must configure the MaxMindVisitor class");
     }
     return $this->_config->getItem($key, $default);
 }
Beispiel #2
0
 public function configure(ConfigSectionInterface $config)
 {
     $failover = $config->getItem("failover", null);
     if ($failover !== null) {
         $this->_failover = $this->getCubex()->make($failover);
         if ($this->_failover instanceof IVisitorInfo) {
             $this->_failover->configure($config);
             $this->_failover->setClientIp($this->_ip);
         }
     }
 }
 /**
  * Remove a section from the configuration
  *
  * @param ConfigSectionInterface $section Section container to remove
  *
  * @return $this
  */
 public function removeSection(ConfigSectionInterface $section)
 {
     $this->removeSectionByName($section->getName());
     return $this;
 }
Beispiel #4
0
 /**
  * Add a config section to the resolver as a data store
  *
  * @param ConfigSectionInterface $config
  */
 public function addDataStoreConfig(ConfigSectionInterface $config)
 {
     $this->_unsetConfigured(self::TYPE_DATASTORE, $config->getName());
     $this->_config[self::TYPE_DATASTORE]->setSection($config);
 }