Collections\Dictionary::toArray PHP Method

toArray() public method

public toArray ( )
    public function toArray()
    {
        return $this->storage;
    }

Usage Example

コード例 #1
0
 public function testConcat()
 {
     $this->coll->add(1)->add(2)->add(4);
     $coll2 = new ArrayList([3]);
     $this->coll->concat($coll2);
     $this->assertEquals([1, 2, 4, 3], $this->coll->toArray());
     $coll3 = new Dictionary(['key1' => 'value1', 'key2' => 'wrongValue']);
     $coll4 = new Dictionary(['key2' => 'value2']);
     $coll3->concat($coll4);
     $this->assertEquals(['key1' => 'value1', 'key2' => 'value2'], $coll3->toArray());
 }
All Usage Examples Of Collections\Dictionary::toArray