コード例 #1
0
ファイル: Record.php プロジェクト: visapi/amun
 public function import(ReaderResult $result)
 {
     switch ($result->getType()) {
         case ReaderInterface::JSON:
             $data = (array) $result->getData();
             $this->setProjectId($result->getParam('projectId'));
             $this->setRevision($data['revision']);
             $this->setUrl($data['url']);
             $this->setAuthor($data['author']);
             $this->setTimestamp($data['timestamp']);
             $this->setMessage($data['message']);
             break;
         default:
             throw new Exception('Reader is not supported');
             break;
     }
 }