Doctrine\MongoDB\Aggregation\Stage\Operator::map PHP Method

map() public method

Applies an expression to each item in an array and returns an array with the applied results.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/map/
See also: Expr::map
public map ( mixed | Expr $input, string $as, mixed | Expr $in )
$input mixed | Doctrine\MongoDB\Aggregation\Expr An expression that resolves to an array.
$as string The variable name for the items in the input array. The in expression accesses each item in the input array by this variable.
$in mixed | Doctrine\MongoDB\Aggregation\Expr The expression to apply to each item in the input array. The expression accesses the item by its variable name.
    public function map($input, $as, $in)
    {
        $this->expr->map($input, $as, $in);
        return $this;
    }