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 )
-
public
setFieldName ( string $name )
Set the name of the field
-
public
getFieldName ( )
Get the name of the field
-
public
setFilename ( string $filename )
Set the path to the file
-
public
setPostname ( string $postname )
Set the post name of the file
-
public
getFilename ( )
Get the full path to the file
-
public
getPostname ( )
Get the post name of the file
-
public
setContentType ( string $type )
Set the Content-Type of the file
-
public
getContentType ( )
Get the Content-Type of the file
-
public
getCurlValue ( )
Get a cURL ready string or CurlFile object for the upload
-
protected
guessContentType ( )
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
string
Implementation 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
string
Implementation of
Get the post name of the file
Returns
string
Implementation 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
string
Implementation of
Get a cURL ready string or CurlFile object for the upload
Returns
string
Implementation 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 |