mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 04:30:16 +02:00
refactored AbstractFactory
This commit is contained in:
11
Creational/AbstractFactory/JsonParser.php
Normal file
11
Creational/AbstractFactory/JsonParser.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Creational\AbstractFactory;
|
||||
|
||||
class JsonParser implements Parser
|
||||
{
|
||||
public function parse(string $input): array
|
||||
{
|
||||
return json_decode($input, true);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user