public function findByKey($key)
    {
        $document = $this->collection->findOne(['_id' => $key]);

        return $this->hydrateEntity($document);
    }
public function findByKey($key)
    {
        $document = $this->collection->findOne(['_id' => $key]);

        return $this->hydrateEntity($document);
    }
public function findByKey ( $ key ) { $ document = $ this -> collection -> findOne ( [ '_id' => $ key ] ) ; return $ this -> hydrateEntity ( $ document ) ; }
Finds an item by key

@param mixed $key

@return mixed
Finds an item by key