public static function createRequestForQuery(Query $query)
    {
        $request = new Message();
        $request->header->set('id', self::generateId());
        $request->header->set('rd', 1);
        $request->questions[] = (array) $query;
        $request->prepare();

        return $request;
    }
public static function createRequestForQuery(Query $query)
    {
        $request = new Message();
        $request->header->set('id', self::generateId());
        $request->header->set('rd', 1);
        $request->questions[] = (array) $query;
        $request->prepare();

        return $request;
    }
public static function createRequestForQuery ( Query $ query ) { $ request = new Message ( ) ; $ request -> header -> set ( 'id' , self :: generateId ( ) ) ; $ request -> header -> set ( 'rd' , 1 ) ; $ request -> questions [ ] = ( array ) $ query ; $ request -> prepare ( ) ; return $ request ; }
Creates a new request message for the given query

@param Query $query
@return self
Creates a new request message for the given query