Documentation

HTTPFile
in package
implements FileWriterInterface

Table of Contents

Interfaces

FileWriterInterface

Constants

CURL_COMMAND  = 'curl %s --output %s --header %s --connect-timeout 300 --retry 3 --http1.1 --silent --fail --insecure --location'
CURL_ENABLED  = true
STATUS_BAD_REQUEST  = 400

Properties

$name  : mixed
$path  : mixed

Methods

copyTo()  : mixed
createFromDocument()  : HTTPFile
createFromDownload()  : null|HTTPFile
createFromFileList()  : HTTPFile
createFromJSON()  : HTTPFile
createFromPath()  : HTTPFile
createFromPHP()  : null|HTTPFile
createFromStream()  : HTTPFile
createFromString()  : HTTPFile
createFromTemp()  : mixed
createFromURL()  : null|HTTPFile
delete()  : mixed
exists()  : bool
getContents()  : string
getDocument()  : mixed
getName()  : mixed
getPath()  : mixed
getTempFile()  : string
setContents()  : mixed
setDocument()  : mixed
setStream()  : mixed
toFile()  : SplFileInfo
toFileName()  : string
toString()  : string
verifyDownload()  : bool
verifyURL()  : bool
__construct()  : mixed

Constants

CURL_COMMAND

public mixed CURL_COMMAND = 'curl %s --output %s --header %s --connect-timeout 300 --retry 3 --http1.1 --silent --fail --insecure --location'

CURL_ENABLED

public mixed CURL_ENABLED = true

STATUS_BAD_REQUEST

public mixed STATUS_BAD_REQUEST = 400

Properties

Methods

copyTo()

public copyTo(mixed $dir[, mixed $name = null ][, mixed $copyClosure = null ]) : mixed
Parameters
$dir : mixed
$name : mixed = null
$copyClosure : mixed = null

createFromDocument()

public static createFromDocument(DOMDocument $doc[, string $fileName = '' ]) : HTTPFile
Parameters
$doc : DOMDocument
$fileName : string = ''
Return values
HTTPFile

createFromDownload()

public static createFromDownload(string $filePath, string $url[, int $headerCache = Seconds::YEAR ]) : null|HTTPFile
Parameters
$filePath : string
$url : string
$headerCache : int = Seconds::YEAR
Return values
null|HTTPFile

createFromFileList()

public static createFromFileList(array<string|int, mixed> $fileList[, string $fileName = '' ]) : HTTPFile
Parameters
$fileList : array<string|int, mixed>
$fileName : string = ''
Return values
HTTPFile

createFromJSON()

public static createFromJSON(mixed $object[, string $fileName = '' ]) : HTTPFile
Parameters
$object : mixed
$fileName : string = ''
Return values
HTTPFile

createFromPath()

public static createFromPath(string $filePath[, string $fileName = '' ]) : HTTPFile
Parameters
$filePath : string
$fileName : string = ''
Return values
HTTPFile

createFromPHP()

public static createFromPHP(string $phpCommand[, string $fileName = '' ]) : null|HTTPFile
Parameters
$phpCommand : string
$fileName : string = ''
Return values
null|HTTPFile

createFromStream()

public static createFromStream(resource $resource[, string $fileName = '' ]) : HTTPFile
Parameters
$resource : resource
$fileName : string = ''
Return values
HTTPFile

createFromString()

public static createFromString(string $content[, string $fileName = '' ]) : HTTPFile
Parameters
$content : string
$fileName : string = ''
Return values
HTTPFile

createFromTemp()

public static createFromTemp([string $fileName = '' ]) : mixed
Parameters
$fileName : string = ''

createFromURL()

public static createFromURL(string $url[, string $fileName = '' ]) : null|HTTPFile
Parameters
$url : string
$fileName : string = ''
Return values
null|HTTPFile

exists()

public exists() : bool
Return values
bool

getContents()

public getContents() : string
Return values
string

getDocument()

public getDocument() : mixed

getTempFile()

public static getTempFile() : string
Return values
string

setContents()

public setContents(string $content) : mixed
Parameters
$content : string

setDocument()

public setDocument(DOMDocument $content) : mixed
Parameters
$content : DOMDocument

setStream()

public setStream(mixed $content) : mixed
Parameters
$content : mixed

toFile()

public toFile() : SplFileInfo
Return values
SplFileInfo

toFileName()

public toFileName() : string
Return values
string

toString()

public toString() : string
Return values
string

verifyDownload()

public static verifyDownload(string $filePath, string $url[, int $headerCache = Seconds::YEAR ]) : bool
Parameters
$filePath : string
$url : string
$headerCache : int = Seconds::YEAR
Return values
bool

verifyURL()

public static verifyURL(string $url[, int $headerCache = Seconds::YEAR ]) : bool
Parameters
$url : string
$headerCache : int = Seconds::YEAR
Return values
bool

__construct()

protected __construct(string $filePath[, string $fileName = '' ]) : mixed
Parameters
$filePath : string
$fileName : string = ''

        
On this page

Search results