toArray() публичный Метод

Get the collection of items as a plain array.
public toArray ( ) : array
Результат array
Пример #1
0
 public function testToArrayCallsToArrayOnEachItemInCollection()
 {
     $item1 = $this->getMock('FOF30\\Registry\\Registry', array('toArray'));
     $item1->expects($this->once())->method('toArray')->will($this->returnValue('foo.array'));
     $item2 = $this->getMock('FOF30\\Registry\\Registry', array('toArray'));
     $item2->expects($this->once())->method('toArray')->will($this->returnValue('bar.array'));
     $c = new Collection(array($item1, $item2));
     $results = $c->toArray();
     $this->assertEquals(array('foo.array', 'bar.array'), $results);
 }