public function save($content) { if (false === file_put_contents($this->file, $content)) { throw new AccessDeniedException(sprintf("Could not write to %s", $this->file)); } }
public function update() { if (!$this->toFile->hasWriteAccess() || !$this->fromFile->hasReadAccess()) { return; } $newContent = $this->getUpdatedTrackerFileContent(); if ($newContent !== $this->getCurrentTrackerFileContent()) { $this->toFile->save($newContent); } }