Neos\Flow\Persistence\Generic\Query::in PHP Method

in() public method

Returns an "in" criterion used for matching objects against a query. It matches if the property's value is contained in the multivalued operand.
public in ( string $propertyName, mixed $operand ) : Comparison
$propertyName string The name of the property to compare against
$operand mixed The value to compare with, multivalued
return Neos\Flow\Persistence\Generic\Qom\Comparison
    public function in($propertyName, $operand)
    {
        if (!is_array($operand) && !$operand instanceof \ArrayAccess && !$operand instanceof \Traversable) {
            throw new InvalidQueryException('The "in" constraint must be given a multi-valued operand (array, ArrayAccess, Traversable).', 1264678095);
        }
        if ($this->classSchema->isMultiValuedProperty($propertyName)) {
            throw new InvalidQueryException('Property "' . $propertyName . '" must not be multi-valued.', 1276777034);
        }
        return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, '_entity'), QueryInterface::OPERATOR_IN, $operand);
    }