1 | <?php |
||
21 | class JsonQuery |
||
22 | { |
||
23 | /** |
||
24 | * @var ProcessFactoryInterface |
||
25 | */ |
||
26 | protected $processFactory; |
||
27 | |||
28 | /** |
||
29 | * @var DataTypeMapper |
||
30 | */ |
||
31 | protected $mapper; |
||
32 | |||
33 | /** |
||
34 | * @var DataProviderInterface |
||
35 | */ |
||
36 | protected $dataProvider; |
||
37 | |||
38 | /** |
||
39 | * Path to the jq command. |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $cmd = 'jq'; |
||
44 | |||
45 | /** |
||
46 | * JsonQuery constructor. |
||
47 | * |
||
48 | * @param ProcessFactoryInterface $processFactory |
||
49 | * @param DataTypeMapper $dataTypeMapper |
||
50 | */ |
||
51 | 3 | public function __construct(ProcessFactoryInterface $processFactory, DataTypeMapper $dataTypeMapper) |
|
56 | |||
57 | /** |
||
58 | * Runs the command-line and returns. |
||
59 | * |
||
60 | * @param string $filter |
||
61 | * |
||
62 | * @return mixed |
||
63 | * @throws DataProviderMissingException |
||
64 | * @throws Exception\DataTypeMapperException |
||
65 | */ |
||
66 | public function run($filter) |
||
82 | 1 | ||
83 | /** |
||
84 | 1 | * @param DataProviderInterface $provider |
|
85 | 1 | */ |
|
86 | public function setDataProvider(DataProviderInterface $provider) |
||
90 | } |
||
91 |