public function __construct($collection, $doc = []) { $this->collection = $collection; $this->extract(new \RecursiveArrayIterator($doc)); }