Google\Cloud\Datastore\Query\Query::mapOperator PHP Method

mapOperator() private method

Convert given operator to API-compatible operator.
private mapOperator ( string $operator ) : string
$operator string
return string
    private function mapOperator($operator)
    {
        if (array_key_exists($operator, $this->shortOperators)) {
            $operator = $this->shortOperators[$operator];
        }
        if (!in_array($operator, $this->allowedOperators)) {
            throw new InvalidArgumentException(sprintf('Invalid operator `%s` given. Valid operators are %s.', $operator, implode(', ', $this->allowedOperators)));
        }
        return $operator;
    }