Beispiel #1
0
 /**
  * configures instance upon construct
  * @param \Altamira\JsWriter\JsWriterAbstract $jsWriter
  */
 protected function configure(\Altamira\JsWriter\JsWriterAbstract $jsWriter)
 {
     $confInstance = \Altamira\Config::getInstance();
     $file = $confInstance['altamira.root'] . $confInstance['altamira.typeconfigpath'];
     $config = \parse_ini_file($file, true);
     $libConfig = $config[strtolower($jsWriter->getLibrary())];
     $type = static::TYPE;
     $typeAttributes = preg_grep("/{$type}\\./i", array_keys($libConfig));
     foreach ($typeAttributes as $key) {
         $attribute = preg_replace("/{$type}\\./i", '', $key);
         $this->{$attribute} = $libConfig[$key];
     }
 }
Beispiel #2
0
 /**
  * Returns the library key for the jswriter
  * @return string
  */
 public function getLibrary()
 {
     return $this->jsWriter->getLibrary();
 }