protected filterCollection ( Traversable | array $collection ) : Traversable | array | ||
$collection | Traversable | array | |
리턴 | Traversable | array |
protected function filterCollection($collection)
{
if (!$collection instanceof Traversable && !is_array($collection)) {
throw new InvalidArgumentException('The collection must be a Traversable object or an array');
}
return $collection;
}