HEX
Server: Apache/2.4.63 (Unix)
System: Linux TOMS-220NAS 4.4.302+ #86009 SMP Wed Nov 26 18:19:17 CST 2025 x86_64
User: flavio87 (1026)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /volume1/web/Marchisa-Toman/wp-content/plugins/wp-google-maps/includes/class.query-fragment.php
<?php

namespace WPGMZA;

if(!defined('ABSPATH'))
	return;

#[\AllowDynamicProperties]
class QueryFragment implements \ArrayAccess, \Countable
{
	private $nextIndex = 0;
	
	#[\ReturnTypeWillChange]
	public function offsetExists($offset)
	{
		return property_exists($this, $offset);
	}
	
	#[\ReturnTypeWillChange]
	public function offsetGet($offset)
	{
		return $this->{$offset};
	}
	
	#[\ReturnTypeWillChange]
	public function offsetSet($offset, $value)
	{
		if(!$offset)
			$offset = $this->nextIndex++;
		
		$this->{$offset} = $value;
	}
	
	#[\ReturnTypeWillChange]
	public function offsetUnset($offset)
	{
		unset($this->{$offset});
	}
	
	public function reset()
	{
		foreach($this as $key => $value)
			unset($this->{$key});
	}
	
	public function toArray()
	{
		$arr = (array)$this;
		
		array_shift($arr);
		
		return $arr;
	}
	
	#[\ReturnTypeWillChange]
	public function count()
	{
		$count = 0;
		
		foreach($this as $key => $value)
			$count++;
		
		return $count - 1;
	}
	
	public function clear()
	{
		foreach($this as $key => $value)
		{
			if($key == 'nextIndex')
				continue;
				
			unset($this->{$key});
		}
	}
}

class_alias('WPGMZA\\QueryFragment', 'WPGMZA\\QueryFields');