MongoCursor::fields PHP Method

fields() public method

Sets the fields for a query
public fields ( array $f ) : MongoCursor
$f array Fields to return (or not return).
return MongoCursor
    public function fields(array $f)
    {
        $this->errorIfOpened();
        $this->projection = $f;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * Wrapper method for MongoCursor::fields().
  *
  * @param array $f Fields to return (or not return).
  *
  * @see http://php.net/manual/en/mongocursor.fields.php
  * @return self
  */
 public function fields(array $f)
 {
     $this->fields = $f;
     $this->mongoCursor->fields($f);
     return $this;
 }
All Usage Examples Of MongoCursor::fields