private function doPermanentFetchToStream ($mediaID, $into)
    {
        $body = $this->client->send(
            new Request(
                'POST',
                'https://api.weixin.qq.com/cgi-bin/material/get_material',
                [],
                json_encode([
                    'media_id' => $mediaID,
                ])
            ),
            [
                RequestOptions::SINK => $this->createWritableStream($into),
            ]
        )->getBody();

        if ($body->isSeekable()) {
            $body->seek(0);
        }

        return $body->detach();
    }
private function doPermanentFetchToStream ($mediaID, $into)
    {
        $body = $this->client->send(
            new Request(
                'POST',
                'https://api.weixin.qq.com/cgi-bin/material/get_material',
                [],
                json_encode([
                    'media_id' => $mediaID,
                ])
            ),
            [
                RequestOptions::SINK => $this->createWritableStream($into),
            ]
        )->getBody();

        if ($body->isSeekable()) {
            $body->seek(0);
        }

        return $body->detach();
    }
private function doPermanentFetchToStream ( $ mediaID , $ into ) { $ body = $ this -> client -> send ( new Request ( 'POST' , 'https://api.weixin.qq.com/cgi-bin/material/get_material' , [ ] , json_encode ( [ 'media_id' => $ mediaID , ] ) ) , [ RequestOptions :: SINK => $ this -> createWritableStream ( $ into ) , ] ) -> getBody ( ) ; if ( $ body -> isSeekable ( ) ) { $ body -> seek ( 0 ) ; } return $ body -> detach ( ) ; }
Downloads the generic permanent media item into the given destination.

@param string               $mediaID
@param string|null|resource $into

@return resource
Downloads the generic permanent media item into the given destination .