PluginProbe ʕ •ᴥ•ʔ
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets / 3.0
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets v3.0
4.1.1 3.9.5 3.9.6 4.0.0 4.0.1 4.1.0 trunk 2.12 2.13 2.14 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 3.4.9 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9 3.7.0 3.7.1 3.7.2 3.7.3 3.7.3-beta-1.0 3.7.4 3.7.4-beta-1.0 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8.0 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4
wp-all-import / libraries / XmlImportConfig.php
wp-all-import / libraries Last commit date
ast 13 years ago cache 13 years ago XmlImportConfig.php 13 years ago XmlImportCsvParse.php 13 years ago XmlImportException.php 13 years ago XmlImportParser.php 13 years ago XmlImportReaderInterface.php 13 years ago XmlImportStringReader.php 13 years ago XmlImportTemplate.php 13 years ago XmlImportTemplateCodeGenerator.php 13 years ago XmlImportTemplateParser.php 13 years ago XmlImportTemplateScanner.php 13 years ago XmlImportToken.php 13 years ago pclzip.lib.php 13 years ago
XmlImportConfig.php
88 lines
1 <?php
2 /**
3 * @author Olexandr Zanichkovsky <olexandr.zanichkovsky@zophiatech.com>
4 * @author Pavel Kulbakin <p.kulbakin@gmail.com>
5 * @package General
6 */
7
8 /**
9 * This class is used for different XmlImport settings
10 */
11 if (!class_exists('XmlImportConfig'))
12 {
13 final class XmlImportConfig
14 {
15 /**
16 * Singleton instance
17 * @var XmlImportConfig
18 */
19 private static $instance = null;
20 /**
21 * Path to cache directory
22 * @var string
23 */
24 private $cache_dir;
25 /**
26 * String to use when concatenating result of xpath corresponding to multiple elements
27 * @var string
28 */
29 private $multi_glue;
30
31 /**
32 * Initial settings
33 */
34 private function init()
35 {
36 $this->setCacheDirectory(dirname(__FILE__) . '/cache');
37 $this->setMultiGlue(', ');
38 }
39
40 /**
41 * Gets instance of a singleton class
42 * @return XmlImportConfig
43 */
44 public static function getInstance()
45 {
46 //if (is_null(self::$instance)) {
47 self::$instance = new self;
48 self::$instance->init();
49 //}
50 return self::$instance;
51 }
52
53 /**
54 * Returns path to cache directory
55 * @return string
56 */
57 public function getCacheDirectory()
58 {
59 return $this->cache_dir;
60 }
61
62 /**
63 * Sets path to cache directory
64 * @param string $cacheDirectoryPath
65 */
66 public function setCacheDirectory($cacheDirectoryPath)
67 {
68 $this->cache_dir = $cacheDirectoryPath;
69 }
70
71 /**
72 * Returns string glue to use when concatenating multiple elements
73 * @return string
74 */
75 public function getMultiGlue()
76 {
77 return $this->multi_glue;
78 }
79 /**
80 * Sets string glue to use when concatenating multiple element
81 * @param unknown_type $glue
82 */
83 public function setMultiGlue($glue)
84 {
85 $this->multi_glue = $glue;
86 }
87 }
88 }