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/
public map ( mixed | self $input, string $as, mixed | self $in )
$input mixed | self 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 | self The expression to apply to each item in the input array. The expression accesses the item by its variable name.
示例#1
0
 /**
  * Applies an expression to each item in an array and returns an array with
  * the applied results.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/map/
  * @see Expr::map
  * @param mixed|Expr $input An expression that resolves to an array.
  * @param string $as        The variable name for the items in the input array. The in expression accesses each item in the input array by this variable.
  * @param mixed|Expr $in    The expression to apply to each item in the input array. The expression accesses the item by its variable name.
  * @return self
  */
 public function map($input, $as, $in)
 {
     $this->expr->map($input, $as, $in);
     return $this;
 }