Skip to content

Commit

Permalink
setContent() method in FileHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
doganoo committed Nov 24, 2018
1 parent 9e4662a commit b011d0b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/FileSystem/FileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,15 @@ public function getContent(): ?string {
return null;
}

/**
* sets the content
*
* @param string $content
* @return bool
*/
public function setContent(string $content): bool {
if (!$this->isFile()) return false;
return false !== \file_put_contents($this->path, $content);
}

}

0 comments on commit b011d0b

Please sign in to comment.