PluginProbe
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager / 1.2.1
FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager v1.2.1
10.56 1.2.1 10 10.1 10.2 10.3 10.31 10.32 10.33 10.34 10.50 10.51 10.52 10.53 10.55 9.0 9.0.1 9.4 trunk 1.0.0 1.1 1.2
easy-code-manager / framework / xml / fetchscalars.php

fetchscalars.php in FluentSnippets – High-Performance Code Snippets, Header & Footer Code, Custom CSS & PHP Code Manager 1.2.1, at framework/xml/fetchscalars.php

32 lines 647 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 *
4 */
5
6 /**
7 *
8 */
9 class CJT_Framework_Xml_Fetchscalars extends ArrayIterator {
10
11 /**
12 * put your comment there...
13 *
14 * @param SimpleXMLElement $element
15 * @return CJT_Framework_Xml_Fetchscalars
16 */
17 public function __construct(SimpleXMLElement $element) {
18 $data = array();
19 // Read all Child elements with no childs inside.
20 foreach ($element->children() as $field => $child) {
21 // Read all elements with no childs inside!
22 // Only with text data!
23 if (!count($child->children())) {
24 $data[$field] = (string) $child;
25 }
26 }
27 // Load array iterator with fetched data.
28 parent::__construct($data);
29 }
30
31
32 } // End class.