getParameter() публичный Метод

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.
Результат mixed The value of the bound parameter.
 /**
  * @test
  */
 public function getParameterDelegatesToConcreteQueryBuilder()
 {
     $this->concreteQueryBuilder->getParameter(Argument::exact('aField'))->shouldBeCalled()->willReturn('aValue');
     $this->subject->getParameter('aField');
 }
Пример #2
0
 /**
  * Gets a (previously set) query parameter of the query being constructed.
  *
  * @param mixed $key The key (index or name) of the bound parameter.
  *
  * @return mixed The value of the bound parameter.
  */
 public function getParameter($key)
 {
     return $this->queryBuilder->getParameter($key);
 }
Пример #3
0
 public function testCreatePositionalParameter()
 {
     $qb = new QueryBuilder($this->conn);
     $qb->select('u.*')->from('users', 'u')->where($qb->expr()->eq('u.name', $qb->createPositionalParameter(10, \PDO::PARAM_INT)));
     $this->assertEquals('SELECT u.* FROM users u WHERE u.name = ?', (string) $qb);
     $this->assertEquals(10, $qb->getParameter(1));
 }
Пример #4
0
 /**
  * Gets a (previously set) query parameter of the query being constructed.
  *
  * @param mixed $key The key (index or name) of the bound parameter.
  *
  * @return mixed The value of the bound parameter.
  */
 public function getParameter($key)
 {
     return $this->qb->getParameter($key);
 }