Свойство | Тип | Описание | |
---|---|---|---|
$_charset | charset of file | ||
$_chunk_size | size of chunk to read with every step | ||
$_compression | type of compression | ||
$_content | the content | ||
$_decompress | whether to decompress content before returning | ||
$_error_message | the error message | ||
$_handle | file handle | ||
$_is_temp | whether the file is temporary or not | ||
$_name | the temporary file name | ||
$_offset | integer |
Метод | Описание | |
---|---|---|
__construct ( boolean | string $name = false ) | constructor | |
__destruct ( ) | destructor | |
checkTblChangeForm ( string $key, string $rownumber ) : boolean | checks the superglobals provided if the tbl_change form is submitted and uses the submitted/selected file | |
checkUploadedFile ( ) : boolean | If we are on a server with open_basedir, we must move the file before opening it. The FAQ 1.11 explains how to create the "./tmp" directory - if needed | |
cleanUp ( ) : boolean | deletes file if it is temporary, usually from a moved upload file | |
close ( ) : void | Closes the file | |
delete ( ) : boolean | deletes the file | |
eof ( ) : boolean | Checks whether we've reached end of file | |
errorUnsupported ( ) : void | Sets error message for unsupported compression. | |
fetchUploadedFromTblChangeRequestMultiple ( array $file, string $rownumber, string $key ) : array | strips some dimension from the multi-dimensional array from $_FILES | |
getCharset ( ) : string | Returns the character set of the file | |
getChunkSize ( ) : integer | Returns the chunk size | |
getCompression ( ) : string | Returns compression used by file. | |
getContent ( ) : string | false | Gets file content | |
getContentLength ( ) : integer | Returns the length of the content in the file | |
getError ( ) : |
Returns possible error message. | |
getHandle ( ) : resource | Returns the file handle | |
getName ( ) : string | accessor | |
getOffset ( ) : integer | Returns the offset | |
getRawContent ( ) : string | false | Gets file content | |
isError ( ) : boolean | Checks whether there was any error. | |
isReadable ( ) : boolean | Checks whether file can be read. | |
isTemp ( boolean $is_temp = null ) : boolean | checks or sets the temp flag for this file file objects with temp flags are deleted with object destruction | |
isUploaded ( ) : boolean | Whether file is uploaded. | |
open ( ) : boolean | Attempts to open the file. | |
openZip ( string | null $specific_entry = null ) : boolean | Opens file from zip | |
read ( integer $size ) : string | Reads data from file | |
setCharset ( string $charset ) : void | Sets the character set of the file | |
setChunkSize ( integer $chunk_size ) : void | Sets the chunk size | |
setDecompressContent ( boolean $decompress ) : void | Sets whether the content should be decompressed before returned | |
setHandle ( object $handle ) : void | Sets the file handle | |
setLocalSelectedFile ( string $name ) : boolean | Sets named file to be read from UploadDir. | |
setName ( string $name ) : void | accessor | |
setSelectedFromTblChangeRequest ( string $key, string $rownumber = null ) : boolean | sets the name if the file to the one selected in the tbl_change form | |
setUploadedFile ( string $name ) : boolean | Initializes object from uploaded file. | |
setUploadedFromTblChangeRequest ( string $key, string $rownumber ) : boolean | Loads uploaded file from table change request. |
Метод | Описание | |
---|---|---|
detectCompression ( ) : string | false | Detects what compression the file uses |
public __construct ( boolean | string $name = false ) | ||
$name | boolean | string | file name or false |
public checkUploadedFile ( ) : boolean | ||
Результат | boolean | whether uploaded file is fine or not |
protected detectCompression ( ) : string | false | ||
Результат | string | false | false on error, otherwise string MIME type of compression, none for none |
public errorUnsupported ( ) : void | ||
Результат | void |
$file['name']['multi_edit'][$rownumber][$key] = [value]
$file['type']['multi_edit'][$rownumber][$key] = [value]
$file['size']['multi_edit'][$rownumber][$key] = [value]
$file['tmp_name']['multi_edit'][$rownumber][$key] = [value]
$file['error']['multi_edit'][$rownumber][$key] = [value]
becomes:
$file['name'] = [value]
$file['type'] = [value]
$file['size'] = [value]
$file['tmp_name'] = [value]
$file['error'] = [value]
public getCharset ( ) : string | ||
Результат | string | character set of the file |
public getChunkSize ( ) : integer | ||
Результат | integer | the chunk size |
public getCompression ( ) : string | ||
Результат | string | MIME type of compression, none for none |
public getContent ( ) : string | false | ||
Результат | string | false | the binary file content as a string, or false if no content |
public getContentLength ( ) : integer | ||
Результат | integer | the length of the file content |
public getHandle ( ) : resource | ||
Результат | resource | file handle |
public getRawContent ( ) : string | false | ||
Результат | string | false | the binary file content, or false if no content |
public isReadable ( ) : boolean | ||
Результат | boolean | whether the file is readable or not |
public isUploaded ( ) : boolean | ||
Результат | boolean |
public setCharset ( string $charset ) : void | ||
$charset | string | character set of the file |
Результат | void |
public setChunkSize ( integer $chunk_size ) : void | ||
$chunk_size | integer | the chunk size |
Результат | void |
public setDecompressContent ( boolean $decompress ) : void | ||
$decompress | boolean | whether to decompress |
Результат | void |
public setLocalSelectedFile ( string $name ) : boolean | ||
$name | string | file name |
Результат | boolean | success |
public setUploadedFile ( string $name ) : boolean | ||
$name | string | name of file uploaded |
Результат | boolean | success |