Documentation

PostFile
in package
implements PostFileInterface

POST file upload

Table of Contents

Interfaces

PostFileInterface
POST file upload

Properties

$contentType  : mixed
$fieldName  : mixed
$filename  : mixed
$postname  : mixed

Methods

__construct()  : mixed
getContentType()  : string
Get the Content-Type of the file
getCurlString()  : mixed
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
guessContentType()  : mixed
Determine the Content-Type of the file

Properties

$contentType

protected mixed $contentType

Methods

__construct()

public __construct(string $fieldName, string $filename[, string $contentType = null ][, string $postname = null ]) : mixed
Parameters
$fieldName : string

Name of the field

$filename : string

Local path to the file

$contentType : string = null

Content-Type of the upload

$postname : string = null

Remote post file name

getContentType()

Get the Content-Type of the file

public getContentType() : string
Return values
string

getCurlString()

public getCurlString() : mixed
Tags
codeCoverageIgnore

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(mixed $type) : self
Parameters
$type : mixed

Content type

Return values
self

setFieldName()

Set the name of the field

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

Field name

Return values
self

setFilename()

Set the path to the file

public setFilename(mixed $filename) : self
Parameters
$filename : mixed
Return values
self

setPostname()

Set the post name of the file

public setPostname(mixed $postname) : self
Parameters
$postname : mixed
Return values
self

guessContentType()

Determine the Content-Type of the file

protected guessContentType() : mixed

        
On this page

Search results