HEX
Server: Apache/2
System: Linux 17792.vpsvinahost.vn 3.10.0-1062.1.1.el7.x86_64 #1 SMP Fri Sep 13 22:55:44 UTC 2019 x86_64
User: hitehp (1010)
PHP: 7.4.28
Disabled: NONE
Upload Files
File: /home/hitehp/public_html/wp-content/plugins/wp-google-maps/includes/class.query-fragment.php
<?php

namespace WPGMZA;

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

class QueryFragment implements \ArrayAccess, \Countable
{
	private $nextIndex = 0;
	
	public function offsetExists($offset)
	{
		return property_exists($this, $offset);
	}
	
	public function offsetGet($offset)
	{
		return $this->{$offset};
	}
	
	public function offsetSet($offset, $value)
	{
		if(!$offset)
			$offset = $this->nextIndex++;
		
		$this->{$offset} = $value;
	}
	
	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;
	}
	
	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');