src/Norm/Collection.php
public function findOne($criteria = array())
    {
        $model = $this->fetchCache($criteria);

        if (is_null($model)) {
            $cursor = $this->find($criteria);
            $model = $cursor->getNext();
            $this->rememberCache($criteria, $model);
        }

        return $model;
    }
public function findOne($criteria = array())
    {
        $model = $this->fetchCache($criteria);

        if (is_null($model)) {
            $cursor = $this->find($criteria);
            $model = $cursor->getNext();
            $this->rememberCache($criteria, $model);
        }

        return $model;
    }
public function findOne ( $ criteria = array ( ) ) { $ model = $ this -> fetchCache ( $ criteria ) ; if ( is_null ( $ model ) ) { $ cursor = $ this -> find ( $ criteria ) ; $ model = $ cursor -> getNext ( ) ; $ this -> rememberCache ( $ criteria , $ model ) ; } return $ model ; }
Find one document from collection

@param  array|mixed $criteria   Criteria to search

@return Norm\Model
Find one document from collection