/** * @param Cms\Data\Build $data */ protected function setValuesFromData(Data\Build $data) { $this->setId($data->getId()); $this->setVersion($data->getVersion()); $this->setTimestamp($data->getTimestamp()); $this->setComment($data->getComment()); $this->setCreatorName($data->getCreatorName()); $this->setLastPublished($data->getLastPublished()); }
/** * @param string $buildZipPath * * @return \Cms\Data\Build */ private function getBuildDataFromBuildZipArchiveComment($buildZipPath) { $buildZipCommentJson = $this->getBuildZipArchiveComment($buildZipPath); $buildZipComment = json_decode($buildZipCommentJson, true); $build = new BuildData(); $build->setFromArray($buildZipComment); if (is_null($build->getVersion())) { $build->setVersion($this->getVersionFromBuildId($build->getId())); } return $build; }