Google\Cloud\Datastore\Query\GqlQuery::__construct PHP Method

__construct() public method

public __construct ( EntityMapper $entityMapper, string $query, array $options = [] )
$entityMapper Google\Cloud\Datastore\EntityMapper An instance of EntityMapper
$query string The GQL Query string.
$options array [optional] { Configuration Options @type bool $allowLiterals Whether literal values will be allowed in the query string. Parameter binding is strongly encouraged over literals. **Defaults to** `false`. @type array $bindings An array of values to bind to the query string. Queries using Named Bindings should provide a key/value set, while queries using Positional Bindings must provide a simple array. Applications with no need for multitenancy should not set this value. }
    public function __construct(EntityMapper $entityMapper, $query, array $options = [])
    {
        $this->entityMapper = $entityMapper;
        $this->query = $query;
        $this->options = $options + ['allowLiterals' => false, 'bindingType' => $this->determineBindingType($options), 'bindings' => []];
    }