⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
php
/
Horde
/
Xml
/
Element
/
View File Name :
List.php
* @license http://www.horde.org/licenses/bsd BSD * @category Horde * @package Xml_Element */ /** * @author Chuck Hagenbuch
* @license http://www.horde.org/licenses/bsd BSD * @category Horde * @package Xml_Element */ abstract class Horde_Xml_Element_List extends Horde_Xml_Element implements Countable, Iterator { /** * Cache of list items. * @var array */ protected $_listItems; /** * Current index on the collection of list items for the Iterator * implementation. * @var integer */ protected $_listItemIndex = 0; /** * The classname for individual list items. * @var string */ protected $_listItemClassName = 'Horde_Xml_Element'; /** * Ensure that $_listItems is populated by calling the concrete implementation's * _buildItemsCache() method. */ public function __wakeup() { parent::__wakeup(); $this->_listItems = $this->_buildListItemCache(); } /** * Called by __wakeup to cache list items. Must be implemented in the * extending class to return the array of list items. * @return array */ abstract protected function _buildListItemCache(); /** * Get the number of items in this list. * * @return integer Item count. */ public function count() { return count($this->_listItems); } /** * Required by the Iterator interface. * * @internal */ public function rewind() { $this->_listItemIndex = 0; } /** * Required by the Iterator interface. * * @internal * * @return mixed The current row, or null if no rows. */ public function current() { return new $this->_listItemClassName( $this->_listItems[$this->_listItemIndex]); } /** * Required by the Iterator interface. * * @internal * * @return mixed The current row number (starts at 0), or null if no rows */ public function key() { return $this->_listItemIndex; } /** * Required by the Iterator interface. * * @internal * * @return mixed The next row, or null if no more rows. */ public function next() { ++$this->_listItemIndex; } /** * Required by the Iterator interface. * * @internal * * @return boolean Whether the iteration is valid */ public function valid() { return (0 <= $this->_listItemIndex && $this->_listItemIndex < count($this->_listItems)); } }