apidoc |
[ class tree: apidoc ] [ index: apidoc ] [ all elements ] |
Packages: HTTP_Download Classes: |
[ Top ] $HTTP = null[line 173] HTTP_HeaderError constants
[ Top ] $lastModified = 0[line 151] Last modifiedError constants
[ Top ] $sentBytes = 0[line 205] Sent BytesError constants
[ Top ] $size = 0[line 143] Size of downloadError constants
[ Top ] $throttleDelay = 0[line 197] Throttle DelayError constants
[ Top ] $_error = null[line 213] Startup errorError constants
[ Top ] Method DetailHTTP_Download (Constructor) [line 250]
Constructor Error constants Set supplied parameters.
Parameters:
[ Top ]
compareAsterisk [line 1163]
Compare against an asterisk or check for equality Error constants
Parameters:
[ Top ]
flush [line 1201]
Flush Error constants
Parameters:
[ Top ]
generateETag [line 825]getChunks [line 936]
Get chunks to send Error constants
[ Top ]
getRanges [line 1100]guessContentType [line 628]
Guess content type of file Error constants First we try to use PEAR::MIME_Type, if installed, to detect the content type, else we check if ext/mime_magic is loaded and properly configured. Returns PEAR_Error if:
[ Top ]
isCached [line 1112]isRangeRequest [line 1086]isValidRange [line 1129]mergeChunks [line 1048]
Merges consecutive chunks to avoid overlaps Error constants
Parameters:
[ Top ]
send [line 674]
Send Error constants Returns PEAR_Error if:
Parameters:
[ Top ]
sendArchive [line 806]
Send a bunch of files or directories as an archive Error constants Example:
Parameters:
[ Top ]
sendChunk [line 877]
Send chunk of data Error constants
Parameters:
[ Top ]
sendChunks [line 850]
Send multiple chunks Error constants
Parameters:
[ Top ]
sendHeaders [line 1179]setBufferSize [line 490]
Set Size of Buffer Error constants The amount of bytes specified as buffer size is the maximum amount of data read at once from resources or files. The default size is 2M (2097152 bytes). Be aware that if you enable gzip compression and you set a very low buffer size that the actual file size may grow due to added gzip headers for each sent chunk of the specified size. Returns PEAR_Error (HTTP_DOWNLOAD_E_INVALID_PARAM) if $size is not greater than 0 bytes.
Parameters:
[ Top ]
setCache [line 429]
Whether to allow caching Error constants If set to true (default) we'll send some headers that are commonly used for caching purposes like ETag, Cache-Control and Last-Modified. If caching is disabled, we'll send the download no matter if it would actually be cached at the client side.
Parameters:
[ Top ]
setCacheControl [line 445]
Whether to allow proxies to cache Error constants If set to 'private' proxies shouldn't cache the response. This setting defaults to 'public' and affects only cached responses.
Parameters:
[ Top ]
setContentDisposition [line 571]
Set Content-Disposition header Error constants
Parameters:
[ Top ]
setContentType [line 594]
Set content type of the download Error constants Default content type of the download will be 'application/x-octetstream'. Returns PEAR_Error (HTTP_DOWNLOAD_E_INVALID_CONTENT_TYPE) if $content_type doesn't seem to be valid.
Parameters:
[ Top ]
setData [line 347]
Set data for download Error constants Set $data to null if you want to unset this.
Parameters:
[ Top ]
setETag [line 469]
Set ETag Error constants Sets a user-defined ETag for cache-validation. The ETag is usually generated by HTTP_Download through its payload information.
Parameters:
[ Top ]
setFile [line 307]
Set path to file for download Error constants The Last-Modified header will be set to files filemtime(), actually. Returns PEAR_Error (HTTP_DOWNLOAD_E_INVALID_FILE) if file doesn't exist. Sends HTTP 404 or 403 status if $send_error is set to true.
Parameters:
[ Top ]
setGzip [line 400]
Whether to gzip the download Error constants Returns a PEAR_Error (HTTP_DOWNLOAD_E_NO_EXT_ZLIB) if ext/zlib is not available/loadable.
Parameters:
[ Top ]
setLastModified [line 546]
Set "Last-Modified" Error constants This is usually determined by filemtime() in HTTP_Download::setFile() If you set raw data for download with HTTP_Download::setData() and you want do send an appropiate "Last-Modified" header, you should call this method.
Parameters:
[ Top ]
setParams [line 269]
Set parameters Error constants Set supplied parameters through its accessor methods.
Parameters:
[ Top ]
setResource [line 364]
Set resource for download Error constants The resource handle supplied will be closed after sending the download. Returns a PEAR_Error (HTTP_DOWNLOAD_E_INVALID_RESOURCE) if $handle is no valid resource. Set $handle to null if you want to unset this.
Parameters:
[ Top ]
setThrottleDelay [line 529]
Set Throttle Delay Error constants Set the amount of seconds to sleep after each chunck that has been sent. One can implement some sort of throttle through adjusting the buffer size and the throttle delay. With the following settings HTTP_Download will sleep a second after each 25 K of data sent.
Just be aware that if gzipp'ing is enabled, decreasing the chunk size too much leads to proportionally increased network traffic due to added gzip header and bottom bytes around each chunk.
Parameters:
[ Top ]
sleep [line 1217]sortChunks [line 1022]
Sorts the ranges to be in ascending order Error constants
Parameters:
[ Top ]
staticSend [line 764]
Static send Error constants
Parameters:
[ Top ]
_getError [line 1232]
Returns and clears startup error Error constants
[ Top ]
Documentation generated on Mon, 11 Mar 2019 15:40:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004. |