Pinq\ITraversable::selectMany PHP Метод

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

Returns the values mapped by the supplied function and then flattens the values into a single traversable. Keys will be reindexed.
public selectMany ( callable $function ) : pinq\ITraversable
$function callable The function returning the data to select
Результат pinq\ITraversable
    public function selectMany(callable $function);

Usage Example

Пример #1
0
 /**
  * @dataProvider tenRandomStrings
  */
 public function testThatSelectManyFlattensCorrectlyAndIgnoresKeys(\Pinq\ITraversable $values, array $data)
 {
     $characters = $values->selectMany(function ($i) {
         return str_split($i);
     });
     $this->assertMatches($characters, array_values(self::flattenArrays(array_map('str_split', $data))));
 }
All Usage Examples Of Pinq\ITraversable::selectMany