Example #1
0
 public static function template($formName, $templateConfig = array())
 {
     //#TODO #1.1.0 path safe this
     if (!file_exists(APPLICATION_PATH . "/configs/form/{$formName}.xml")) {
         throw new Exception("Requested form template, {$formName}, was not found.");
     }
     $rawXml = file_get_contents(APPLICATION_PATH . "/configs/form/{$formName}.xml");
     $dereferencedXml = Saf_Model_Reflector::dereference($rawXml, $templateConfig);
     return new Zend_Config_Xml($dereferencedXml);
 }
Example #2
0
 public function get($config = NULL)
 {
     return is_null($config) ? $this->_rawMessage : Saf_Model_Reflector::dereference($this->_rawMessage, $config);
 }