Pinq\Providers\DSL\Compilation\Parameters\ParameterCollection::add PHP Метод

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

Adds an parameter to the collection with the supplied context.
public add ( Pinq\Providers\DSL\Compilation\Parameters\IQueryParameter $parameter ) : void
$parameter Pinq\Providers\DSL\Compilation\Parameters\IQueryParameter
Результат void
    public function add(IQueryParameter $parameter)
    {
        $this->parameters[] = $parameter;
    }

Usage Example

Пример #1
0
 public function testCustomParameter()
 {
     $parameterMock = $this->getMock('Pinq\\Providers\\DSL\\Compilation\\Parameters\\IQueryParameter');
     $parameterMock->expects($this->any())->method('evaluate')->with($this->equalTo(new ResolvedParameterRegistry(['abc' => 'foobar'])))->willReturn('resolved-value');
     $this->collection->add($parameterMock);
     $this->assertResolvesTo(['resolved-value'], ['abc' => 'foobar']);
 }
All Usage Examples Of Pinq\Providers\DSL\Compilation\Parameters\ParameterCollection::add