PluginProbe ʕ •ᴥ•ʔ
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets / 4.1.1
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets v4.1.1
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 1 month ago XmlImportConfig.php 1 month ago XmlImportCsvParse.php 1 month ago XmlImportException.php 1 month ago XmlImportParser.php 1 month ago XmlImportReaderInterface.php 1 month ago XmlImportSQLParse.php 1 month ago XmlImportStringReader.php 1 month ago XmlImportTemplate.php 1 month ago XmlImportTemplateCodeGenerator.php 1 month ago XmlImportTemplateParser.php 1 month ago XmlImportTemplateScanner.php 4 days ago XmlImportToken.php 1 month ago XmlImportXLSParse.php 1 month ago wpaipclzip.lib.php 1 month ago
XmlImportConfig.php
89 lines
1 <?php
2 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals
3 /**
4 * @author Olexandr Zanichkovsky <olexandr.zanichkovsky@zophiatech.com>
5 * @author Pavel Kulbakin <p.kulbakin@gmail.com>
6 * @package General
7 */
8
9 /**
10 * This class is used for different XmlImport settings
11 */
12 if (!class_exists('XmlImportConfig'))
13 {
14 final class XmlImportConfig
15 {
16 /**
17 * Singleton instance
18 * @var XmlImportConfig
19 */
20 private static $instance = null;
21 /**
22 * Path to cache directory
23 * @var string
24 */
25 private $cache_dir;
26 /**
27 * String to use when concatenating result of xpath corresponding to multiple elements
28 * @var string
29 */
30 private $multi_glue;
31
32 /**
33 * Initial settings
34 */
35 private function init()
36 {
37 $this->setCacheDirectory(dirname(__FILE__) . '/cache');
38 $this->setMultiGlue( apply_filters('wp_all_import_multi_glue', ', ') );
39 }
40
41 /**
42 * Gets instance of a singleton class
43 * @return XmlImportConfig
44 */
45 public static function getInstance()
46 {
47 //if (is_null(self::$instance)) {
48 self::$instance = new self;
49 self::$instance->init();
50 //}
51 return self::$instance;
52 }
53
54 /**
55 * Returns path to cache directory
56 * @return string
57 */
58 public function getCacheDirectory()
59 {
60 return $this->cache_dir;
61 }
62
63 /**
64 * Sets path to cache directory
65 * @param string $cacheDirectoryPath
66 */
67 public function setCacheDirectory($cacheDirectoryPath)
68 {
69 $this->cache_dir = $cacheDirectoryPath;
70 }
71
72 /**
73 * Returns string glue to use when concatenating multiple elements
74 * @return string
75 */
76 public function getMultiGlue()
77 {
78 return $this->multi_glue;
79 }
80 /**
81 * Sets string glue to use when concatenating multiple element
82 * @param unknown_type $glue
83 */
84 public function setMultiGlue($glue)
85 {
86 $this->multi_glue = $glue;
87 }
88 }
89 }