Property | Type | Description | |
---|---|---|---|
$filename | string | Hold the orig filename given in multipart header | |
$headers | array | Holds the header information as array | |
$inputStream | Holds input stream file pointer | ||
$name | string | The name of the part | |
$size | integer | Holds the number of bytes written to inputStream | |
$tmpFilename | string | Hold the templary filename. |
Method | Description | |
---|---|---|
addHeader ( string $name, string $value ) : void | Adds header information to the part | |
delete ( ) : void | Deletes the underlying storage for a file item, including deleting any associated temporary disk file. | |
fromHttpRequest ( AppserverIo\Psr\HttpMessage\PartInterface $httpPart ) : |
Creates a new servlet part instance with the data from the HTTP part. | |
getContentType ( ) : string | Gets the content type of this part. | |
getFilename ( ) : string | Gets the original form filename. | |
getHeader ( string $name ) : string | Returns the value of the specified mime header as a String. | |
getHeaderNames ( ) : array | Gets the header names of this Part. | |
getHeaders ( string $name = null ) : array | Gets the values of the Part header with the given name. | |
getInputStream ( ) : resource | Gets the content of this part as an InputStream | |
getName ( ) : string | Gets the name of this part | |
getSize ( ) : integer | Returns the size of this file. | |
getTmpFilename ( ) : string | Returns the temporary filename. | |
init ( string $streamWrapper = self::STREAM_WRAPPER_TEMP, integer $maxMemory = 5242880 ) : void | Initiates a http form part object | |
putContent ( string $content ) : void | Puts content to input stream. | |
setFilename ( string $filename ) : void | Sets the orig form filename. | |
setName ( string $name ) : void | Sets the name of the part | |
setTmpFilename ( string $tmpFilename ) : void | Sets the temporary filename. | |
write ( string $fileName ) : integer | A convenience method to write this uploaded item to disk. |
public static fromHttpRequest ( AppserverIo\Psr\HttpMessage\PartInterface $httpPart ) : |
||
$httpPart | AppserverIo\Psr\HttpMessage\PartInterface | The HTTP part we want to copy |
return | The initialized servlet part |
public getContentType ( ) : string | ||
return | string | The content type of this part. |
public getFilename ( ) : string | ||
return | string | The file's name |
public getHeaderNames ( ) : array | ||
return | array |
public getHeaders ( string $name = null ) : array | ||
$name | string | the header name whose values to return |
return | array |
public getInputStream ( ) : resource | ||
return | resource | The content of this part as an InputStream |
public getTmpFilename ( ) : string | ||
return | string | The temporary filename |
public putContent ( string $content ) : void | ||
$content | string | The content as string |
return | void |
public setFilename ( string $filename ) : void | ||
$filename | string | The file's name |
return | void |
public setTmpFilename ( string $tmpFilename ) : void | ||
$tmpFilename | string | The temporary filename |
return | void |
protected string $filename | ||
return | string |
protected array $headers | ||
return | array |
protected int $size | ||
return | integer |
protected string $tmpFilename | ||
return | string |