| 1 | <?php |
||
| 28 | class SourceJson implements SourceInterface |
||
| 29 | { |
||
| 30 | /** |
||
| 31 | * The JsonFile. |
||
| 32 | * |
||
| 33 | * @var JsonArray |
||
| 34 | */ |
||
| 35 | protected $data; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Create a new instance. |
||
| 39 | * |
||
| 40 | * @param JsonArray $data The json array. |
||
| 41 | */ |
||
| 42 | public function __construct(JsonArray $data) |
||
| 43 | { |
||
| 44 | $this->data = $data; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritDoc} |
||
| 49 | */ |
||
| 50 | public function get($path, $forceArray = false) |
||
| 54 | |||
| 55 | /** |
||
| 56 | * {@inheritDoc} |
||
| 57 | */ |
||
| 58 | public function has($path) |
||
| 62 | |||
| 63 | /** |
||
| 64 | * {@inheritDoc} |
||
| 65 | */ |
||
| 66 | public function set($path, $value) |
||
| 72 | } |
||
| 73 |