RemoteFilesystem
class RemoteFilesystem (View source)
Methods
__construct(IOInterface $io, Config $config = null, array $options = array(), bool $disableTls = false)
Constructor.
bool
copy(string $originUrl, string $fileUrl, string $fileName, bool $progress = true, array $options = array())
Copy the remote file in local.
bool|string
getContents(string $originUrl, string $fileUrl, bool $progress = true, array $options = array())
Get the content.
array
getOptions()
Retrieve the options set in the constructor
setOptions(array $options)
Merges new options
bool
isTlsDisabled()
Check is disable TLS.
array
getLastHeaders()
Returns the headers of the last request
string|null
findHeaderValue(array $headers, string $name)
No description
int|null
findStatusCode(array $headers)
No description
string|null
findStatusMessage(array $headers)
No description
bool|string
get(string $originUrl, string $fileUrl, array $additionalOptions = array(), string $fileName = null, bool $progress = true)
Get file content or copy action.
string|false
getRemoteContents($originUrl, $fileUrl, $context, array $responseHeaders = null)
Get contents of remote URL.
callbackGet(int $notificationCode, int $severity, string $message, int $messageCode, int $bytesTransferred, int $bytesMax)
Get notification action.
promptAuthAndRetry($httpStatus, $reason = null, $warning = null, $headers = array())
No description
getOptionsForUrl($originUrl, $additionalOptions)
No description
Details
at line 56
__construct(IOInterface $io, Config $config = null, array $options = array(), bool $disableTls = false)
Constructor.
at line 84
bool
copy(string $originUrl, string $fileUrl, string $fileName, bool $progress = true, array $options = array())
Copy the remote file in local.
at line 99
bool|string
getContents(string $originUrl, string $fileUrl, bool $progress = true, array $options = array())
Get the content.
at line 109
array
getOptions()
Retrieve the options set in the constructor
at line 119
setOptions(array $options)
Merges new options
at line 129
bool
isTlsDisabled()
Check is disable TLS.
at line 139
array
getLastHeaders()
Returns the headers of the last request
at line 149
string|null
findHeaderValue(array $headers, string $name)
at line 169
int|null
findStatusCode(array $headers)
at line 187
string|null
findStatusMessage(array $headers)
at line 215
protected bool|string
get(string $originUrl, string $fileUrl, array $additionalOptions = array(), string $fileName = null, bool $progress = true)
Get file content or copy action.
at line 590
protected string|false
getRemoteContents($originUrl, $fileUrl, $context, array $responseHeaders = null)
Get contents of remote URL.
at line 619
protected
callbackGet(int $notificationCode, int $severity, string $message, int $messageCode, int $bytesTransferred, int $bytesMax)
Get notification action.