BigQuery/src/QueryJobConfiguration.php
public function parameters(array $parameters)
    {
        $queryParams = [];
        $this->config['configuration']['query']['parameterMode'] = $this->isAssoc($parameters)
            ? 'named'
            : 'positional';

        foreach ($parameters as $name => $value) {
            $param = $this->mapper->toParameter($value);

            if ($this->config['configuration']['query']['parameterMode'] === 'named') {
                $param += ['name' => $name];
            }

            $queryParams[] = $param;
        }

        $this->config['configuration']['query']['queryParameters'] = $queryParams;

        return $this;
    }
public function parameters(array $parameters)
    {
        $queryParams = [];
        $this->config['configuration']['query']['parameterMode'] = $this->isAssoc($parameters)
            ? 'named'
            : 'positional';

        foreach ($parameters as $name => $value) {
            $param = $this->mapper->toParameter($value);

            if ($this->config['configuration']['query']['parameterMode'] === 'named') {
                $param += ['name' => $name];
            }

            $queryParams[] = $param;
        }

        $this->config['configuration']['query']['queryParameters'] = $queryParams;

        return $this;
    }
public function parameters ( array $ parameters ) { $ queryParams = [ ] ; $ this -> config [ 'configuration' ] [ 'query' ] [ 'parameterMode' ] = $ this -> isAssoc ( $ parameters ) ? 'named' : 'positional' ; foreach ( $ parameters as $ name => $ value ) { $ param = $ this -> mapper -> toParameter ( $ value ) ; if ( $ this -> config [ 'configuration' ] [ 'query' ] [ 'parameterMode' ] === 'named' ) { $ param += [ 'name' => $ name ] ; } $ queryParams [ ] = $ param ; } $ this -> config [ 'configuration' ] [ 'query' ] [ 'queryParameters' ] = $ queryParams ; return $ this ; }
Sets parameters to be used on the query. Only available for standard SQL
queries.

For examples of usage please see
{@see Google\Cloud\BigQuery\BigQueryClient::runQuery()}.

@param array $parameters Parameters to use on the query. When providing
a non-associative array positional parameters (`?`) will be used.
When providing an associative array named parameters will be used
(`@name`).
@return QueryJobConfiguration
Sets parameters to be used on the query . Only available for standard SQL queries .