PluginProbe
Import WP – CSV & XML Import Export for WordPress / 2.7.7
Import WP – CSV & XML Import Export for WordPress v2.7.7
2.15.1 2.15.0 2.14.24 2.14.23 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.9.0 2.9.1 All 144 releases
jc-importer / class / Common / Importer / Parser / JSONParser.php

JSONParser.php in Import WP – CSV & XML Import Export for WordPress 2.7.7, at class/Common/Importer/Parser/JSONParser.php

31 lines 579 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ImportWP\Common\Importer\Parser;
4
5 use ImportWP\Common\Importer\ParserInterface;
6
7 class JSONParser extends AbstractParser implements ParserInterface
8 {
9 /**
10 * JSON Record
11 *
12 * @var array
13 */
14 private $json_record;
15
16 public function query($query)
17 {
18 return isset($this->json_record[$query]) ? $this->json_record[$query] : '';
19 }
20
21 protected function onRecordLoaded()
22 {
23 $this->json_record = json_decode($this->record, true);
24 }
25
26 public function record()
27 {
28 return $this->json_record;
29 }
30 }
31