PluginProbe ʕ •ᴥ•ʔ
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets / 2.13
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets v2.13
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 / ast / XmlImportAstXpathClause.php
wp-all-import / libraries / ast Last commit date
XmlImportAstElseif.php 14 years ago XmlImportAstExpression.php 14 years ago XmlImportAstFloat.php 14 years ago XmlImportAstForeach.php 14 years ago XmlImportAstFunction.php 14 years ago XmlImportAstIf.php 14 years ago XmlImportAstInteger.php 14 years ago XmlImportAstLiteral.php 14 years ago XmlImportAstMath.php 14 years ago XmlImportAstPrint.php 14 years ago XmlImportAstSequence.php 14 years ago XmlImportAstStatement.php 14 years ago XmlImportAstString.php 14 years ago XmlImportAstText.php 14 years ago XmlImportAstWith.php 14 years ago XmlImportAstXPath.php 14 years ago XmlImportAstXpathClause.php 14 years ago
XmlImportAstXpathClause.php
84 lines
1 <?php
2 /**
3 * @author Olexandr Zanichkovsky <olexandr.zanichkovsky@zophiatech.com>
4 * @package AST
5 */
6
7 require_once dirname(__FILE__) . '/XmlImportAstStatement.php';
8 require_once dirname(__FILE__) . '/XmlImportAstXPath.php';
9 require_once dirname(__FILE__) . '/XmlImportAstSequence.php';
10
11 /**
12 * Represents a clause that is based on XPath
13 */
14 abstract class XmlImportAstXPathClause extends XmlImportAstStatement
15 {
16 /**
17 * XPath expression
18 *
19 * @var XmlImportAstXPath
20 */
21 private $xpath;
22
23 /**
24 * Clause body
25 *
26 * @var XmlImportAstSequence
27 */
28 private $body;
29
30 /**
31 * Creates new instance
32 *
33 * @param XmlImportAstXPath $xpath
34 * @param XmlImportAstSequence $body
35 */
36 public function __construct(XmlImportAstXPath $xpath, XmlImportAstSequence $body)
37 {
38 $this->xpath = $xpath;
39 $this->body = $body;
40 }
41
42 /**
43 * Gets XPath
44 *
45 * @return XmlImportAstXPath
46 */
47 public function getXpath()
48 {
49 return $this->xpath;
50 }
51
52 /**
53 * Gets clause body
54 *
55 * @return XmlImportAstSequence
56 */
57 public function getBody()
58 {
59 return $this->body;
60 }
61
62 /**
63 * String representation of a clause
64 *
65 * @return string
66 */
67 public function __toString()
68 {
69 $result = "--> begin " . get_class($this) . "\n";
70 $result .= ' XPath: ' . $this->xpath . "\n";
71 $result .= " Body:\n";
72
73 $array = explode("\n", $this->body);
74 for ($i = 0; $i < count($array); $i++)
75 {
76 $array[$i] = ' ' . $array[$i];
77 }
78
79 $result .= implode("\n", $array) . "\n";
80 $result .= "--> end " . get_class($this) . "\n";
81 return $result;
82 }
83 }
84