Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/lib/web/dom/ |
Upload File : |
<?php namespace Bitrix\Main\Web\DOM; /* class NodeList extends \Bitrix\Main\Type\Dictionary implements \Traversable { public function item($index) { return $this->offsetGet($index); } public function haveItem(Node $item) { for($i = 0; $i < $this->count(); $i++) { if($item->isEqual($this->item($i))) { return true; } } return false; } public function removeItem(Node $item) { for($i = 0; $i < $this->count(); $i++) { if($item === $this->item($i)) { $this->offsetUnset($i); break; } } } } */ class NodeList implements \Iterator { protected $length = 0; protected $position = 0; protected $values = array(); public function __construct(array $values = null) { if($values === null) { $this->position = 0; $this->set($values); } } public function getLength() { return $this->length; } /* * @return Node|null */ public function item($index) { if($this->valid($index)) { return $this->values[$index]; } return null; } public function set(array $values) { $this->values = array_values($values); $this->length = count($this->values); } public function get() { return $this->values; } public function rewind() { $this->position = 0; } public function current() { return $this->values[$this->position]; } public function key() { return $this->position; } public function next() { ++$this->position; } public function valid($index = null) { if($index === null) { $index = $this->position; } return isset($this->values[$index]); } }