public function matchOne(array $contentConditions, array $versionConditions = array(), $sort = array(), $offset = 0)
    {
        $results = $this->match($contentConditions, $versionConditions, $sort, $offset, 2);
        $count = count($results);
        if ($count !== 1) {
            throw new InvalidMatchResultsNumberException("Found $count " . $this->returns . " when expected exactly only one to match the conditions");
        }
        return reset($results);
    }
public function matchOne(array $contentConditions, array $versionConditions = array(), $sort = array(), $offset = 0)
    {
        $results = $this->match($contentConditions, $versionConditions, $sort, $offset, 2);
        $count = count($results);
        if ($count !== 1) {
            throw new InvalidMatchResultsNumberException("Found $count " . $this->returns . " when expected exactly only one to match the conditions");
        }
        return reset($results);
    }
public function matchOne ( array $ contentConditions , array $ versionConditions = array ( ) , $ sort = array ( ) , $ offset = 0 ) { $ results = $ this -> match ( $ contentConditions , $ versionConditions , $ sort , $ offset , 2 ) ; $ count = count ( $ results ) ; if ( $ count !== 1 ) { throw new InvalidMatchResultsNumberException ( "Found $count " . $ this -> returns . " when expected exactly only one to match the conditions" ) ; } return reset ( $ results ) ; }
Like match, but will throw an exception if there are 0 or more than 1 items matching

@param array $contentConditions
@param array $versionConditions
@param array $sort
@param int $offset
@return mixed
@throws InvalidMatchConditionsException
@throws InvalidMatchResultsNumberException
Like match but will throw an exception if there are 0 or more than 1 items matching