To create series of related or dependent objects without specifying their concrete classes. Usually the created classes all implement the same interface. The client of the abstract factory does not care about how these objects are created, it just knows how they go together.
You can also find this code on GitHub
WriterFactory.php
WriterFactory.php
CsvWriter.php
CsvWriter.php
JsonWriter.php
JsonWriter.php
UnixCsvWriter.php
UnixCsvWriter.php
UnixJsonWriter.php
UnixJsonWriter.php
UnixWriterFactory.php
UnixWriterFactory.php
WinCsvWriter.php
WinCsvWriter.php
WinJsonWriter.php
WinJsonWriter.php
WinWriterFactory.php
WinWriterFactory.php
Tests/AbstractFactoryTest.php
Tests/AbstractFactoryTest.php