예제 #1
0
 /**
  * getIterator
  *
  * @return array|\Traversable
  */
 public function getIterator()
 {
     $a = new ArrayObject($this->toArray());
     return $a->getIterator();
 }
예제 #2
0
 /**
  * Returns the collection iterator.
  * 
  * @return \Iterator
  */
 public function getIterator()
 {
     return $this->entities->getIterator();
 }
예제 #3
0
 public function testIterator()
 {
     $ar = new ArrayObject(array('1' => 'one', '2' => 'two', '3' => 'three'));
     $iterator = $ar->getIterator();
     $iterator2 = new \ArrayIterator($ar->getArrayCopy());
     $this->assertEquals($iterator2->getArrayCopy(), $iterator->getArrayCopy());
 }