mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Add isIterable modifier
This commit is contained in:
parent
ed8098604b
commit
0b4d026050
@ -157,4 +157,12 @@ class Modifier {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
* @return bool
|
||||
*/
|
||||
public static function isIterable($value) {
|
||||
return is_array($value) || ($value instanceof \Iterator);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user