Class PostFile
POST file upload
- Guzzle\Http\Message\PostFile implements Guzzle\Http\Message\PostFileInterface
Methods summary
-
public__construct ( string $fieldName, string $filename, string $contentType = null, string $postname = null ) -
publicsetFieldName ( string $name )Set the name of the field
-
publicgetFieldName ( )Get the name of the field
-
publicsetFilename ( string $filename )Set the path to the file
-
publicsetPostname ( string $postname )Set the post name of the file
-
publicgetFilename ( )Get the full path to the file
-
publicgetPostname ( )Get the post name of the file
-
publicsetContentType ( string $type )Set the Content-Type of the file
-
publicgetContentType ( )Get the Content-Type of the file
-
publicgetCurlValue ( )Get a cURL ready string or CurlFile object for the upload
-
protectedguessContentType ( )Determine the Content-Type of the file
Methods detail
#
public
__construct( string $fieldName, string $filename, string $contentType = null, string $postname = null )
Parameters
- $fieldName
string
$fieldName Name of the field- $filename
string
$filename Local path to the file- $contentType
string
$postname Remote post file name- $postname
string
$contentType Content-Type of the upload
Set the name of the field
Parameters
- $name
string
$name Field name
Returns
Implementation of
Get the name of the field
Returns
stringImplementation of
Set the path to the file
Parameters
- $filename
string
$path Full path to the file
Returns
Throws
Implementation of
Set the post name of the file
Parameters
- $postname
string
$name The new name of the file
Returns
Implementation of
Get the full path to the file
Returns
stringImplementation of
Get the post name of the file
Returns
stringImplementation of
Set the Content-Type of the file
Parameters
- $type
string
$type Content type
Returns
Implementation of
Get the Content-Type of the file
Returns
stringImplementation of
Get a cURL ready string or CurlFile object for the upload
Returns
stringImplementation of
Determine the Content-Type of the file
Magic methods summary
Properties summary
protected
mixed
|
$fieldName | |
protected
mixed
|
$contentType | |
protected
mixed
|
$filename | |
protected
mixed
|
$postname |