public function searchOne(array $criterias = array())
    {
        $results = $this->search($criterias, 1);

        if (count($results) !== 1) {
            return null;
        }

        return $results[0];
    }
public function searchOne(array $criterias = array())
    {
        $results = $this->search($criterias, 1);

        if (count($results) !== 1) {
            return null;
        }

        return $results[0];
    }
public function searchOne ( array $ criterias = array ( ) ) { $ results = $ this -> search ( $ criterias , 1 ) ; if ( count ( $ results ) !== 1 ) { return null ; } return $ results [ 0 ] ; }
Searches for one messages on the server.

See method `Message::match` method for more informations on criterias.

@param array $criterias

@return Message|null
Searches for one messages on the server .