Exemple #1
0
 /**
  * @access public
  * @param array $options
  * @return void
  */
 public function updateCustomConfig($options)
 {
     //processor.AnydatasetFilenameProcessor
     $configFile = new AnydatasetFilenameProcessor("customconfig");
     $phyFile = $this->CurrentSitePath() . $configFile->FullQualifiedName();
     //anydataset.AnyDataset
     $config = new AnyDataset($phyFile->FullQualifiedNameAndPath());
     //anydataset.AnyIterator
     $it = $config->getIterator();
     if ($it->hasNext()) {
         $config->removeRow(0);
     }
     $config->appendRow();
     foreach (array_keys($options) as $key) {
         if (trim($options[$key]) != "") {
             $this->addPairToConfig($key, $options[$key]);
             $config->addField($key, $options[$key]);
         }
     }
     $config->Save($phyFile);
 }