Check if this request's body input is a collection of objects or not

@return bool
164579
protected function isRequestBodyACollection(Request $request)
    {
        $input = $request->input();

        // Check that the top-level of the body is an array
        if (is_array($input) && count($input) > 0) {

            // Check if the first element is an array (json object)
            $firstChild = array_shift($input);

            if (is_array($firstChild)) {
                return true;
            }
        }

        return false;
    }
1217468
public function isFirst()
    {
        $parent = $this->parent();
        $collection = $parent ? $parent->collection('content', false) : null;
        if ($collection instanceof Collection) {
            return $collection->isFirst($this->path());
        }

        return true;
    }
747795
protected function validateCollectionItem()
    {
        $id = $this->getUpdatingId();

        if ($id === false) {
            return null;
        }

        $data = $this->collection_item->get($id);

        if (empty($data)) {
            $this->setErrorUnavailable('update', $this->translation->text('Collection item'));
            return false;
        }

        $this->setSubmitted('update', $data);
        return true;
    }
828804
public function isSet() : bool
    {
        if (count($this->objects) < 1)
        {
            throw new Exception("ORGroup contains too few objects");
        }

        foreach ($this->objects as $object)
        {
            if ($object->isSet())
            {
                return true;
            }
        }

        return false;
    }
1181377
public function isArray()
    {
        $parts = $this->getParts();

        // Array types are complex types with one element, their names begins with 'ArrayOf'.
        // So if not - that's not array. Only field must be array also.
        return $this->isComplex()
            && count($parts) == 1
            && (substr($this->name, 0, 7) == 'ArrayOf')
            && substr(reset($parts), -2, 2) == '[]';
    }
1095154
public function isIndexed()
    {
        $fields = $this->getFieldsInQuery();
        foreach ($fields as $field) {
            if ( ! $this->collection->isFieldIndexed($field)) {
                return false;
            }
        }
        return true;
    }
348378
private function _collection($collection) {
    return (!is_array($collection) && !is_object($collection)) ? str_split((string) $collection) : $collection;
  }
1238993
private boolean hasSameStructure() {
        Object wrappedCollection = getWrappedValue();
        if (wrappedCollection == null) {
            return bufferedListModel.size() == 0;
        }
        else if (wrappedCollection instanceof Object[]) {
            Object[] wrappedArray = (Object[])wrappedCollection;
            if (wrappedArray.length != bufferedListModel.size()) {
                return false;
            }
            for (int i = 0; i < bufferedListModel.size(); i++) {
                if(super.hasValueChanged(wrappedArray[i], bufferedListModel.get(i))) {
                    return false;
                }
            }
        }
        else {
            if (((Collection)wrappedCollection).size() != bufferedListModel.size()) {
                return false;
            }
            for (Iterator i = ((Collection)wrappedCollection).iterator(), j = bufferedListModel.iterator(); i.hasNext();) {
                if (super.hasValueChanged(i.next(), j.next())) {
                    return false;
                }
            }
        }
        return true;
    }
641906
protected function is_collection_like($value)
    {
        if ($value instanceof self) {
            return true;

        } else if ($value instanceof \Traversable) {
            return true;

        } else if ($value instanceof Arrayable) {
            return true;

        } else if ($value instanceof Jsonable) {
            return true;

        } else if (is_object($value) || is_array($value)) {
            return true;

        } else {
            return false;
        }
    }
1098709
public function hasExactCountOfObjects($count): bool
    {
        $this->collectObjects(true);

        return $this->getCountOfObjectsInCollection() === (int)$count;
    }
684487
public function isAjaxRequest()
    {
        return (
            (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
            || !empty($this->getRequest('ajax'))
            || !empty($this->getRequest('ajax_cb'))
            || !empty($this->getRequest('if_cb'))
        );
    }
1285916
public function isManyOperation(): bool
	{
		return ($this->getInput() && array_keys($this->getInput()) === range(0, count($this->getInput()) - 1));
	}
563053
protected function isCollection($data)
    {
        if (is_array($data) || $data instanceof \Illuminate\Support\Collection || $data instanceof Paginator) {
            return true;
        }

        $length = count($this->getCollectionClass());

        for ($i = 0; $i < $length; $i++) {
            $class = \Illuminate\Support\Arr::get($this->getCollectionClass(), $i);

            if ($data instanceof $class) {
                return true;
            }
        }

        return false;
    }
25960
static boolean isCollectionOrArray(final Object obj) {
        final Class<?> cls = obj.getClass();
        return Collection.class.isAssignableFrom(cls) || cls.isArray();
    }
1121903
public function isSection() {
		if ($this->isCurrent()) {
			return true;
		}
		$ancestors = $this->getAncestors();
		if (Director::get_current_page() instanceof Page) {
			$node = Director::get_current_page()->asMenuItem();
			if ($node) {
				$ancestors = $node->getAncestors();
				return $ancestors && in_array($this->ID, $node->getAncestors()->column());
			}
			
		}
		return false;
	}
773337
public function has_actual_responses() {
        foreach ($this->get_response_class_ids() as $responseclassid) {
            if ($this->get_response_class($responseclassid)->has_actual_responses()) {
                return true;
            }
        }
        return false;
    }
135956
protected function isSuccess(Collection $body)
    {
        if (! $body->has('code') || ! $body->has('message')) {
            throw new ResponseException('Response missing code or message', 0, $body);
        }

        if ($body->get('code') == 0) {
            return true;
        }

        return false;
    }