public function search(array $params)
    {
        $response = $this->requestAndResponse('SEARCH', $params);
        if (!$response) {
            return $response;
        }

        foreach ($response as $ids) {
            if ($ids[0] == 'SEARCH') {
                array_shift($ids);
                return $ids;
            }
        }
        return array();
    }
public function search(array $params)
    {
        $response = $this->requestAndResponse('SEARCH', $params);
        if (!$response) {
            return $response;
        }

        foreach ($response as $ids) {
            if ($ids[0] == 'SEARCH') {
                array_shift($ids);
                return $ids;
            }
        }
        return array();
    }
public function search ( array $ params ) { $ response = $ this -> requestAndResponse ( 'SEARCH' , $ params ) ; if ( ! $ response ) { return $ response ; } foreach ( $ response as $ ids ) { if ( $ ids [ 0 ] == 'SEARCH' ) { array_shift ( $ ids ) ; return $ ids ; } } return array ( ) ; }
do a search request

This method is currently marked as internal as the API might change and is not
safe if you don't take precautions.

@internal
@return array message ids
do a search request