XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
ArrayRecipientIterator.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of SwiftMailer.
5  * (c) 2004-2009 Chris Corbyn
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10 
11 //@require 'Swift/Mailer/RecipientIterator.php';
12 
21 {
22 
28  private $_recipients = array();
29 
34  public function __construct(array $recipients)
35  {
36  $this->_recipients = $recipients;
37  }
38 
43  public function hasNext()
44  {
45  return !empty($this->_recipients);
46  }
47 
54  public function nextRecipient()
55  {
56  return array_splice($this->_recipients, 0, 1);
57  }
58 
59 }