Documentation

PostFileInterface

POST file upload

Table of Contents

Methods

getContentType()  : string
Get the Content-Type of the file
getCurlValue()  : string
Get a cURL ready string or CurlFile object for the upload
getFieldName()  : string
Get the name of the field
getFilename()  : string
Get the full path to the file
getPostname()  : string
Get the post name of the file
setContentType()  : self
Set the Content-Type of the file
setFieldName()  : self
Set the name of the field
setFilename()  : self
Set the path to the file
setPostname()  : self
Set the post name of the file

Methods

getContentType()

Get the Content-Type of the file

public getContentType() : string
Return values
string

getCurlValue()

Get a cURL ready string or CurlFile object for the upload

public getCurlValue() : string
Return values
string

getFieldName()

Get the name of the field

public getFieldName() : string
Return values
string

getFilename()

Get the full path to the file

public getFilename() : string
Return values
string

getPostname()

Get the post name of the file

public getPostname() : string
Return values
string

setContentType()

Set the Content-Type of the file

public setContentType(string $type) : self
Parameters
$type : string

Content type

Return values
self

setFieldName()

Set the name of the field

public setFieldName(string $name) : self
Parameters
$name : string

Field name

Return values
self

setFilename()

Set the path to the file

public setFilename(string $path) : self
Parameters
$path : string

Full path to the file

Tags
throws
InvalidArgumentException

if the file cannot be read

Return values
self

setPostname()

Set the post name of the file

public setPostname(string $name) : self
Parameters
$name : string

The new name of the file

Return values
self

        
On this page

Search results