\Guzzle\Http\MessagePostFileInterface

POST file upload

Summary

Methods
Constants
setFieldName()
getFieldName()
setFilename()
setPostname()
getFilename()
getPostname()
setContentType()
getContentType()
getCurlValue()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setFieldName()

setFieldName(string  $name) : self

Set the name of the field

Parameters

string $name

Field name

Returns

self

getFieldName()

getFieldName() : string

Get the name of the field

Returns

string

setFilename()

setFilename(string  $path) : self

Set the path to the file

Parameters

string $path

Full path to the file

Throws

\Guzzle\Common\Exception\InvalidArgumentException

if the file cannot be read

Returns

self

setPostname()

setPostname(string  $name) : self

Set the post name of the file

Parameters

string $name

The new name of the file

Returns

self

getFilename()

getFilename() : string

Get the full path to the file

Returns

string

getPostname()

getPostname() : string

Get the post name of the file

Returns

string

setContentType()

setContentType(string  $type) : self

Set the Content-Type of the file

Parameters

string $type

Content type

Returns

self

getContentType()

getContentType() : string

Get the Content-Type of the file

Returns

string

getCurlValue()

getCurlValue() : string

Get a cURL ready string or CurlFile object for the upload

Returns

string