Doctrine\MongoDB\Aggregation\Stage\Match::field PHP Method

field() public method

Set the current field for building the expression.
See also: Expr::field()
public field ( string $field )
$field string
    public function field($field)
    {
        $this->query->field((string) $field);
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 public function testMatchStage()
 {
     $matchStage = new Match($this->getTestAggregationBuilder());
     $matchStage->field('someField')->equals('someValue');
     $this->assertSame(array('$match' => array('someField' => 'someValue')), $matchStage->getExpression());
 }