コード例 #1
0
ファイル: Collector.php プロジェクト: ndrx-io/profiler
 /**
  * Convert data into jsonpatch query and save it in the data source
  * @return mixed
  */
 public function persist()
 {
     $this->validate();
     if (!is_array($this->data)) {
         $this->data = [$this->data];
     }
     $append = $this instanceof StreamCollectorInterface;
     $patches = $this->jsonPatch->generateArrayAdd($this->getPath(), $this->data, $append);
     $this->dataSource->save($this->process, $patches);
     $this->data = [];
 }