public function findOneByParams(array $params = [])
    {
        $params['limit'] = 1;
        $records = $this->findByParams($params);
        if (count($records) > 0) {
            return $records->rewind();
        }

        return null;
    }
public function findOneByParams(array $params = [])
    {
        $params['limit'] = 1;
        $records = $this->findByParams($params);
        if (count($records) > 0) {
            return $records->rewind();
        }

        return null;
    }
public function findOneByParams ( array $ params = [ ] ) { $ params [ 'limit' ] = 1 ; $ records = $ this -> findByParams ( $ params ) ; if ( count ( $ records ) > 0 ) { return $ records -> rewind ( ) ; } return null ; }
Finds one Record using params array

@param array $params
@return Record|null
Finds one Record using params array