/** * Returns the contents of the collection as array. * * @return PathMapping[][] An array containing all path mappings indexed * first by repository, then by module name. */ public function toArray() { if ($this->primaryKeysSorted) { $this->lazySortPrimaryKeys(); } return $this->map->toArray(); }
public function testSortSecondaryKeysWithOrder() { $this->map->set('b', 'foo', 'value1'); $this->map->set('b', 'bar', 'value2'); $this->map->set('b', 'baz', 'value3'); $this->map->set('a', 'bam', 'value4'); $this->map->sortSecondaryKeys('b', array('baz', 'foo', 'bar', 'bam')); $this->assertSame(array('b' => array('baz' => 'value3', 'foo' => 'value1', 'bar' => 'value2'), 'a' => array('bam' => 'value4')), $this->map->toArray()); }
/** * Returns the contents of the collection as array. * * @return BindingTypeDescriptor[][] A multi-dimensional array containing * all types indexed first by name, then * by package name. */ public function toArray() { return $this->map->toArray(); }