for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace nstdio\svg\output;
/**
* Class Output
*
* @package nstdio\svg\output
* @author Edgar Asatryan <[email protected]>
*/
class Output implements OutputInterface
{
* @var FileOutputInterface
private $fileImpl;
* @var ImageOutputInterface
private $imageImpl;
public function __construct(FileOutputInterface $fileOutput = null, ImageOutputInterface $imageOutput = null)
$this->fileImpl = $fileOutput === null ? new FileOutput() : $fileOutput;
$this->imageImpl = $imageOutput === null ? new ImageOutput() : $imageOutput;
}
* @inheritdoc
public function file($name, $content, $override)
return $this->fileImpl->file($name, $content, $override);
public function imageFile($content, $name, $format, $override)
return $this->imageImpl->imageFile($content, $name, $format, $override);
public function image($content, $format, $sendHeader)
return $this->imageImpl->image($content, $format, $sendHeader);
public function setFileOutput(FileOutputInterface $fileOutput)
$this->fileImpl = $fileOutput;
public function setImageOutput(ImageOutputInterface $imageOutput)
$this->imageImpl = $imageOutput;