Files
DesignPatternsPHP/Creational/AbstractFactory/UnixWriterFactory.php
Dominik Liebler e3fd6631b5 Abstract factory (#366)
* rewrite of the Abstract Factory pattern

* update composer deps

* fixed argument to json_encode which cannot be null
2019-09-03 18:40:18 +02:00

17 lines
312 B
PHP

<?php
namespace DesignPatterns\Creational\AbstractFactory;
class UnixWriterFactory implements WriterFactory
{
public function createCsvWriter(): CsvWriter
{
return new UnixCsvWriter();
}
public function createJsonWriter(): JsonWriter
{
return new UnixJsonWriter();
}
}