public projection ( array | string $properties ) : |
||
$properties | array | string | The property or properties to include in the result. |
return |
public function projection($properties)
{
if (!is_array($properties)) {
$properties = [$properties];
}
foreach ($properties as $property) {
$this->query['projection'][] = ['property' => $this->propertyName($property)];
}
return $this;
}