/**
  * Gets this object represented as an ArrayIterator.
  *
  * This allows the data properties to be accessed via a foreach statement.
  *
  * @return  \ArrayIterator  This object represented as an ArrayIterator.
  *
  * @see     IteratorAggregate::getIterator()
  * @since   1.3.0
  */
 public function getIterator()
 {
     return $this->registry->getIterator();
 }
Exemplo n.º 2
0
 /**
  * testGetIterator
  *
  * @return  void
  *
  * @covers  Windwalker\Registry\Registry::getIterator
  */
 public function testGetIterator()
 {
     $this->assertInstanceOf('RecursiveArrayIterator', $this->instance->getIterator());
     $this->assertEquals($this->getTestData(), iterator_to_array($this->instance));
     $this->assertEquals(iterator_to_array(new \RecursiveIteratorIterator(new \RecursiveArrayIterator($this->getTestData()))), iterator_to_array(new \RecursiveIteratorIterator($this->instance)));
 }