Server : Apache System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64 User : tradze ( 1001) PHP Version : 8.1.34 Disable Function : NONE Directory : /home/tradze/public_html/test.tradze.com/vendor/stripe-php/lib/Util/ |
<?php
namespace Stripe\Util;
use IteratorAggregate;
use ArrayIterator;
class Set implements IteratorAggregate
{
private $_elts;
public function __construct($members = array())
{
$this->_elts = array();
foreach ($members as $item) {
$this->_elts[$item] = true;
}
}
public function includes($elt)
{
return isset($this->_elts[$elt]);
}
public function add($elt)
{
$this->_elts[$elt] = true;
}
public function discard($elt)
{
unset($this->_elts[$elt]);
}
public function toArray()
{
return array_keys($this->_elts);
}
public function getIterator()
{
return new ArrayIterator($this->toArray());
}
}