導入 (Previous) (Next) HTTP_Download::setParams

View this page in Last updated: Sun, 05 Oct 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

HTTP_Download::HTTP_Download()

HTTP_Download::HTTP_Download() -- コンストラクタ

説明

HTTP_Download オブジェクトのインスタンスを生成し、 提供されるパラメータをセットします。

パラメータ

  • array $params - パラメータの連想配列:

    • 次のうちの一つ:

      • $params['file'] - ファイルパスを指定します。

      • $params['data'] - 生データを指定します。

      • $params['resource'] - リソースハンドルを指定します。

    • さらに、次のいくつか:

      • $params['gzip'] - gzip ダウンロードを行うかどうかを指定します。

      • $params['cache'] - ダウンロードするものをクライアント側に キャッシュさせるかどうかを指定します。

      • $params['lastmodified'] - 最終更新日時の UNIX タイムスタンプを指定します。

      • $params['contenttype'] - Content-type を指定します。

      • $params['contentdisposition'] - Content-disposition を指定します。

      • $params['buffersize'] - ファイルやリソースから 一度に読み込むバイト数を指定します。

      • $params['throttledelay'] - 各チャンク送出後の停止秒数を指定します。

      • $params['cachecontrol'] - キャッシュのプライバシーと妥当性を指定します。

導入 (Previous) (Next) HTTP_Download::setParams

Download Documentation Last updated: Sun, 05 Oct 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: redbeard
To make things work properly under PHP5 I believe each parameter has to have the same capitalization as the set*() commands, e.g. 'CacheControl' and 'Gzip' instead of 'cachecontrol' and 'gzip'. The reason for this is that setParams() uses 'set' . $param to build a method call. This works fine in PHP4 but (IIRC) breaks in PHP5.

Also, if a method takes more than one parameter it can be set with each parameter as an element of an array. For instance, you can set the cache control with 'CacheControl' => array('public', 2592000).