| Server IP : 23.111.136.34 / Your IP : 216.73.216.136 Web Server : Apache System : Linux servidor.eurohost.com.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : meusitei ( 1072) PHP Version : 5.6.40 Disable Function : show_source, system, shell_exec, passthru, proc_open MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/meusitei/public_html/painel/mkt/MailWizzApi/ |
Upload File : |
<?php
/**
* CMapIterator class file.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @link http://www.yiiframework.com/
* @copyright 2008-2013 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
/**
* CMapIterator implements an iterator for {@link CMap}.
*
* It allows CMap to return a new iterator for traversing the items in the map.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @package system.collections
* @since 1.0
*/
/**
* MailWizzApi_ParamsIterator implements an interator for {@link MailWizzApi_Params}.
*
* It allows MailWizzApi_Params to return a new iterator for traversing the items in the map.
*
* @author Serban George Cristian
* @link http://www.mailwizz.com
* @copyright 2013-2017 http://www.mailwizz.com/
* @package MailWizzApi
* @since 1.0
*
* Implementation based on CMapIterator class file from the Yii framework.
* Please see /license/yiiframework.txt file for license info.
*/
class MailWizzApi_ParamsIterator implements Iterator
{
/**
* @var array the data to be iterated through
*/
private $_data;
/**
* @var array list of keys in the map
*/
private $_keys;
/**
* @var mixed current key
*/
private $_key;
/**
* Constructor.
* @param array $data the data to be iterated through
*/
public function __construct(&$data)
{
$this->_data =& $data;
$this->_keys = array_keys($data);
$this->_key = reset($this->_keys);
}
/**
* Rewinds internal array pointer.
* This method is required by the interface Iterator.
*/
public function rewind()
{
$this->_key = reset($this->_keys);
}
/**
* Returns the key of the current array element.
* This method is required by the interface Iterator.
* @return mixed the key of the current array element
*/
public function key()
{
return $this->_key;
}
/**
* Returns the current array element.
* This method is required by the interface Iterator.
* @return mixed the current array element
*/
public function current()
{
return $this->_data[$this->_key];
}
/**
* Moves the internal pointer to the next array element.
* This method is required by the interface Iterator.
*/
public function next()
{
$this->_key = next($this->_keys);
}
/**
* Returns whether there is an element at current position.
* This method is required by the interface Iterator.
* @return boolean
*/
public function valid()
{
return $this->_key !== false;
}
}