예제 #1
0
 /**
  * @param Model\Document $document
  * @throws \Zend_Json_Exception
  */
 protected function addDataToDocument(Model\Document $document)
 {
     // data
     if ($this->getParam("data")) {
         $data = \Zend_Json::decode($this->getParam("data"));
         foreach ($data as $name => $value) {
             $data = $value["data"];
             $type = $value["type"];
             $document->setRawElement($name, $type, $data);
         }
     }
 }