Skip to content

Commit

Permalink
RowCollection::filter accepts an array of possible values
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Feb 12, 2014
1 parent 166d95b commit abd0e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SimpleCrud/RowCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public function filter ($name, $value, $first = false) {
$rows = [];

foreach ($this->rows as $row) {
if ($row->$name === $value) {
if (($row->$name === $value) || (is_array($value) && in_array($row->$name, $value, true))) {
if ($first === true) {
return $row;
}
Expand Down

0 comments on commit abd0e62

Please sign in to comment.