Definition at line 36 of file NameTree.php.
◆ __construct()
Object constructor
- Parameters
-
Definition at line 51 of file NameTree.php.
54 #require_once 'Zend/Pdf/Exception.php'; 58 $intermediateNodes = array();
60 if ($rootDictionary->Kids !==
null) {
61 $intermediateNodes[] = $rootDictionary;
63 $leafNodes[] = $rootDictionary;
66 while (
count($intermediateNodes) != 0) {
67 $newIntermediateNodes = array();
68 foreach ($intermediateNodes as $node) {
69 foreach ($node->Kids->items as $childNode) {
70 if ($childNode->Kids !==
null) {
71 $newIntermediateNodes[] = $childNode;
73 $leafNodes[] = $childNode;
77 $intermediateNodes = $newIntermediateNodes;
80 foreach ($leafNodes as $leafNode) {
81 $destinationsCount =
count($leafNode->Names->items)/2;
83 $this->_items[$leafNode->Names->items[
$count*2]->value] = $leafNode->Names->items[
$count*2 + 1];
◆ clear()
◆ count()
◆ current()
◆ key()
◆ next()
◆ offsetExists()
Definition at line 117 of file NameTree.php.
119 return array_key_exists($offset, $this->_items);
◆ offsetGet()
Definition at line 123 of file NameTree.php.
125 return $this->_items[$offset];
◆ offsetSet()
offsetSet |
( |
|
$offset, |
|
|
|
$value |
|
) |
| |
Definition at line 129 of file NameTree.php.
131 if ($offset ===
null) {
134 $this->_items[$offset] =
$value;
◆ offsetUnset()
Definition at line 139 of file NameTree.php.
141 unset($this->_items[$offset]);
◆ rewind()
◆ valid()
◆ $_items
The documentation for this class was generated from the following file: