for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace rtens\domin\parameters\file;
use rtens\domin\parameters\File;
class SavedFile implements File {
/** @var string */
private $path;
private $type;
private $name;
/**
* @param string $path
* @param string $name
* @param string $type
*/
public function __construct($path, $name, $type) {
$this->path = $path;
$this->name = $name;
$this->type = $type;
}
* @return string
public function getContent() {
return file_get_contents($this->path);
public function getType() {
return $this->type;
* @return int
public function getSize() {
return filesize($this->path);
public function getName() {
return $this->name;
* @param string $content
public function setContent($content) {
file_put_contents($this->path, $content);
public function save($path) {
copy($this->path, $path);