Exemplo n.º 1
0
 /**
  * Get settings for a certain type.
  *
  * This should be refactored.
  *
  * @param string $type
  * 
  * @return Yamm_EntitySettingsAbstract
  *   A fresh new instance, non linked to this. NULL if none saved.
  * 
  * @throws Yamm_Entity_ClassNotFoundException
  *   If no settings class is available.
  */
 public function getSettingsForType($type)
 {
     $className = Yamm_EntityFactory::findClass($type, Yamm_EntityFactory::CLASS_SETTINGS);
     $settings = new $className();
     if ($this->hasOption('entity_' . $type)) {
         $settings->setOptions($this->getOption('entity_' . $type));
     }
 }