예제 #1
0
 public function copy()
 {
     $copy = new Appcelerator_Message();
     $copy->setType($this->getType());
     $copy->setVersion($this->getVersion());
     $copy->setScope($this->getScope());
     $copy->setData(array($this->getData()));
     return $copy;
 }
예제 #2
0
 private function decodeJSON($input)
 {
     $request = Zend_Json::decode($input, true);
     //$request = $request['request'];
     $this->timestamp = $request['timestamp'];
     $this->version = $request['version'];
     $this->message = array();
     // we're going to fill this with messages
     foreach ($request['messages'] as $smessage) {
         $message = new Appcelerator_Message();
         $message->setType($smessage['type']);
         $message->setVersion($smessage['version']);
         $message->setScope($smessage['scope']);
         $message->setData($smessage['data']);
         $this->requests[] = $message;
     }
 }