Pinq\Utilities::isIterable PHP Метод

isIterable() публичный статический Метод

Returns whether the value is iterable
public static isIterable ( mixed $value ) : boolean
$value mixed The value
Результат boolean Whether the value is iterable
    public static function isIterable($value)
    {
        return $value instanceof \Traversable || is_array($value);
    }

Usage Example

Пример #1
0
 public function removeRange($values)
 {
     if (!Utilities::isIterable($values)) {
         throw PinqException::invalidIterable(__METHOD__, $values);
     }
     $this->executeQuery($this->newMethod(__FUNCTION__, [$values]));
 }