-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Although the filter argument is listed explicitly in the signature, it is still optional. It was not included in the options array to allow for BC, since most drivers currently take it as the first parameter.
Usage example:
$collection->find( // Optional criteria param, which we allow as the first positional argument for BC ['x' => 1], // Optional named params in an associative array (BC break, projection in 1.x) ['limit' => 10] ); $collection->find( // Optional criteria param, which we allow as the first positional argument for BC [], // Optional named params in an associative array (BC break, projection in 1.x) [ 'skip' => 20, 'sort' => array("firstName" => 1), 'modifiers' => array('$showDiskLoc' => true), ] );