public function ensureIndex($collection, array $indexes, array $unique) { $unique = $unique ? true : false; //signature requires a bool in both Mongo v. 1.0.1 and 1.2.0 $this->mongo->selectCollection($collection)->ensureIndex($indexes, $unique); }