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 MemoryFile implements File {
/** @var string */
private $name;
private $type;
private $content;
/**
* @param string $name
* @param string $type
* @param string $content
*/
public function __construct($name, $type, $content = '') {
$this->name = $name;
$this->content = $content;
$this->type = $type;
}
public function setContent($content) {
* @return string
public function getName() {
return $this->name;
public function getContent() {
return $this->content;
public function getType() {
return $this->type;
* @return int
public function getSize() {
return strlen($this->content);
* @param string $path
public function save($path) {
file_put_contents($path, $this->content);