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
$fieldName
protected
mixed
$fieldName
$filename
protected
mixed
$filename
$postname
protected
mixed
$postname
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
stringgetCurlString()
public
getCurlString() : mixed
Tags
getCurlValue()
Get a cURL ready string or CurlFile object for the upload
public
getCurlValue() : string
Return values
stringgetFieldName()
Get the name of the field
public
getFieldName() : string
Return values
stringgetFilename()
Get the full path to the file
public
getFilename() : string
Return values
stringgetPostname()
Get the post name of the file
public
getPostname() : string
Return values
stringsetContentType()
Set the Content-Type of the file
public
setContentType(mixed $type) : self
Parameters
- $type : mixed
-
Content type
Return values
selfsetFieldName()
Set the name of the field
public
setFieldName(mixed $name) : self
Parameters
- $name : mixed
-
Field name
Return values
selfsetFilename()
Set the path to the file
public
setFilename(mixed $filename) : self
Parameters
- $filename : mixed
Return values
selfsetPostname()
Set the post name of the file
public
setPostname(mixed $postname) : self
Parameters
- $postname : mixed
Return values
selfguessContentType()
Determine the Content-Type of the file
protected
guessContentType() : mixed