1 | <?php |
||
21 | class WriterFactory |
||
22 | { |
||
23 | protected static $map = [ |
||
24 | 'eps' => EpsWriter::class, |
||
25 | 'jpg' => JpgWriter::class, |
||
26 | 'png' => PngWriter::class, |
||
27 | 'svg' => SvgWriter::class |
||
28 | ]; |
||
29 | |||
30 | /** |
||
31 | * @param string $name |
||
32 | * |
||
33 | * @throws UnknownWriterException |
||
34 | * @return WriterInterface |
||
35 | */ |
||
36 | public static function fromName(string $name): WriterInterface |
||
44 | } |
||
45 |