Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Commit

Permalink
Add concatAll
Browse files Browse the repository at this point in the history
  • Loading branch information
italolelis committed Dec 11, 2015
1 parent 3082796 commit aa0a6d0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Rx/RxTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,16 @@ public function indexBy($callback)

return $group;
}

public function concatAll()
{
$results = new static();
$this->each(function ($subArray, $key) use ($results) {
$subArray->each(function ($item) use ($results, $key) {
$results[$key] = $item;
});
});

return $results;
}
}

0 comments on commit aa0a6d0

Please sign in to comment.