Doctrine\DBAL\Query\QueryBuilder::getParameter PHP Method

getParameter() public method

Gets a (previously set) query parameter of the query being constructed.
public getParameter ( mixed $key ) : mixed
$key mixed The key (index or name) of the bound parameter.
return mixed The value of the bound parameter.
    public function getParameter($key)
    {
        return isset($this->params[$key]) ? $this->params[$key] : null;
    }

Usage Example

 /**
  * @test
  */
 public function getParameterDelegatesToConcreteQueryBuilder()
 {
     $this->concreteQueryBuilder->getParameter(Argument::exact('aField'))->shouldBeCalled()->willReturn('aValue');
     $this->subject->getParameter('aField');
 }
All Usage Examples Of Doctrine\DBAL\Query\QueryBuilder::getParameter