HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpwatermates/wp-content/plugins/wp-google-maps/includes/class.dom-query-results.php
<?php

namespace WPGMZA;

class DOMQueryResults implements \ArrayAccess, \Countable, \Iterator
{
	private $index = 0;
	private $container;
	
	public function __construct(array $arr = null)
	{
		if(!empty($arr))
			$this->container = $arr;
		else
			$this->container = array();
	}
	
	public function __call($name, $arguments)
	{
		foreach($this->container as $element)
		{
			if(!method_exists($element, $name))
				throw new \Exception("No such method '$name' on " . get_class($element));
			
			call_user_func_array(
				array($element, $name),
				$arguments
			);
		}
		
		return $this;
	}
	
	#[\ReturnTypeWillChange]
	public function offsetExists($offset)
	{
		return isset($this->container[$offset]);
	}
	
	#[\ReturnTypeWillChange]
	public function offsetGet($offset)
	{
		return isset($this->container[$offset]) ? $this->container[$offset] : null;
	}
	
	#[\ReturnTypeWillChange]
	public function offsetSet($offset, $value)
	{
		if(!($value instanceof DOMElement))
			throw new \Exception("Only DOMElement is permitted in query results");
		
		if(is_null($offset))
			$this->container[] = $value;
		else
			$this->container[$offset] = $value;
	}
	
	#[\ReturnTypeWillChange]
	public function offsetUnset($offset)
	{
		unset($this->container[$offset]);
	}
	
	#[\ReturnTypeWillChange]
	public function count()
	{
		return count($this->container);
	}
	
	#[\ReturnTypeWillChange]
	public function current()
	{
		return $this->container[$this->index];
	}
	
	#[\ReturnTypeWillChange]
	public function next()
	{
		$this->index++;
	}
	
	#[\ReturnTypeWillChange]
	public function key()
	{
		return $this->index;
	}
	
	#[\ReturnTypeWillChange]
	public function valid()
	{
		return isset($this->container[$this->key()]);
	}

	#[\ReturnTypeWillChange]
	public function rewind()
	{
		$this->index = 0;
	}
	
	#[\ReturnTypeWillChange]
	public function reverse()
	{
		$this->container = array_reverse($this->container);
		$this->rewind();
	}
}