Documentation

RemoteFilesystem
in package

Tags
author

François Pluchino francois.pluchino@opendisplay.com

author

Jordi Boggiano j.boggiano@seld.be

author

Nils Adermann naderman@naderman.de

Table of Contents

$bytesMax  : mixed
$config  : mixed
$degradedMode  : mixed
$disableTls  : mixed
$displayedOriginAuthentications  : mixed
$fileName  : mixed
$fileUrl  : mixed
$io  : mixed
$lastHeaders  : mixed
$lastProgress  : mixed
$maxRedirects  : mixed
$options  : mixed
$originUrl  : mixed
$peerCertificateMap  : mixed
$progress  : mixed
$redirects  : mixed
$retry  : mixed
$retryAuthFailure  : mixed
$scheme  : mixed
$storeAuth  : mixed
__construct()  : mixed
Constructor.
copy()  : bool
Copy the remote file in local.
findHeaderValue()  : string|null
findStatusCode()  : int|null
findStatusMessage()  : string|null
getContents()  : bool|string
Get the content.
getLastHeaders()  : array<string|int, mixed>
Returns the headers of the last request
getOptions()  : array<string|int, mixed>
Retrieve the options set in the constructor
getOrigin()  : mixed
isTlsDisabled()  : bool
Check is disable TLS.
outputWarnings()  : mixed
setOptions()  : mixed
Merges new options
callbackGet()  : mixed
Get notification action.
get()  : bool|string
Get file content or copy action.
getOptionsForUrl()  : mixed
getRemoteContents()  : string|false
Get contents of remote URL.
promptAuthAndRetry()  : mixed
getCertificateCnAndFp()  : mixed
Fetch certificate common name and fingerprint for validation of SAN.
getTlsDefaults()  : array<string|int, mixed>
getUrlAuthority()  : mixed
handleRedirect()  : mixed
isPublicBitBucketDownload()  : bool
stripCredentialsFromUrl()  : mixed

Properties

$displayedOriginAuthentications

private mixed $displayedOriginAuthentications = array()

Methods

__construct()

Constructor.

public __construct(IOInterface $io[, Config $config = null ][, array<string|int, mixed> $options = array() ][, bool $disableTls = false ]) : mixed
Parameters
$io : IOInterface

The IO instance

$config : Config = null

The config

$options : array<string|int, mixed> = array()

The options

$disableTls : bool = false
Return values
mixed

copy()

Copy the remote file in local.

public copy(string $originUrl, string $fileUrl, string $fileName[, bool $progress = true ][, array<string|int, mixed> $options = array() ]) : bool
Parameters
$originUrl : string

The origin URL

$fileUrl : string

The file URL

$fileName : string

the local filename

$progress : bool = true

Display the progression

$options : array<string|int, mixed> = array()

Additional context options

Return values
bool

true

findHeaderValue()

public findHeaderValue(array<string|int, mixed> $headers, string $name) : string|null
Parameters
$headers : array<string|int, mixed>

array of returned headers like from getLastHeaders()

$name : string

header name (case insensitive)

Return values
string|null

findStatusCode()

public findStatusCode(array<string|int, mixed> $headers) : int|null
Parameters
$headers : array<string|int, mixed>

array of returned headers like from getLastHeaders()

Return values
int|null

findStatusMessage()

public findStatusMessage(array<string|int, mixed> $headers) : string|null
Parameters
$headers : array<string|int, mixed>

array of returned headers like from getLastHeaders()

Return values
string|null

getContents()

Get the content.

public getContents(string $originUrl, string $fileUrl[, bool $progress = true ][, array<string|int, mixed> $options = array() ]) : bool|string
Parameters
$originUrl : string

The origin URL

$fileUrl : string

The file URL

$progress : bool = true

Display the progression

$options : array<string|int, mixed> = array()

Additional context options

Return values
bool|string

The content

getLastHeaders()

Returns the headers of the last request

public getLastHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOptions()

Retrieve the options set in the constructor

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

Options

getOrigin()

public static getOrigin(mixed $urlOrPath) : mixed
Parameters
$urlOrPath : mixed
Return values
mixed

isTlsDisabled()

Check is disable TLS.

public isTlsDisabled() : bool
Return values
bool

setOptions()

Merges new options

public setOptions(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>
Return values
mixed

callbackGet()

Get notification action.

protected callbackGet(int $notificationCode, int $severity, string $message, int $messageCode, int $bytesTransferred, int $bytesMax) : mixed
Parameters
$notificationCode : int

The notification code

$severity : int

The severity level

$message : string

The message

$messageCode : int

The message code

$bytesTransferred : int

The loaded size

$bytesMax : int

The total size

Tags
throws
TransportException
Return values
mixed

get()

Get file content or copy action.

protected get(string $originUrl, string $fileUrl[, array<string|int, mixed> $additionalOptions = array() ][, string $fileName = null ][, bool $progress = true ]) : bool|string
Parameters
$originUrl : string

The origin URL

$fileUrl : string

The file URL

$additionalOptions : array<string|int, mixed> = array()

context options

$fileName : string = null

the local filename

$progress : bool = true

Display the progression

Tags
throws
TransportException|Exception
throws
TransportException

When the file could not be downloaded

Return values
bool|string

getOptionsForUrl()

protected getOptionsForUrl(mixed $originUrl, mixed $additionalOptions) : mixed
Parameters
$originUrl : mixed
$additionalOptions : mixed
Return values
mixed

getRemoteContents()

Get contents of remote URL.

protected getRemoteContents(string $originUrl, string $fileUrl, resource $context[, array<string|int, mixed> &$responseHeaders = null ]) : string|false
Parameters
$originUrl : string

The origin URL

$fileUrl : string

The file URL

$context : resource

The stream context

$responseHeaders : array<string|int, mixed> = null
Return values
string|false

The response contents or false on failure

promptAuthAndRetry()

protected promptAuthAndRetry(mixed $httpStatus[, mixed $reason = null ][, mixed $warning = null ][, mixed $headers = array() ]) : mixed
Parameters
$httpStatus : mixed
$reason : mixed = null
$warning : mixed = null
$headers : mixed = array()
Return values
mixed

getCertificateCnAndFp()

Fetch certificate common name and fingerprint for validation of SAN.

private getCertificateCnAndFp(mixed $url, mixed $options) : mixed
Parameters
$url : mixed
$options : mixed
Tags
todo

Remove when PHP 5.6 is minimum supported version.

Return values
mixed

getTlsDefaults()

private getTlsDefaults(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
$options : array<string|int, mixed>
Return values
array<string|int, mixed>

getUrlAuthority()

private getUrlAuthority(mixed $url) : mixed
Parameters
$url : mixed
Return values
mixed

handleRedirect()

private handleRedirect(array<string|int, mixed> $http_response_header, array<string|int, mixed> $additionalOptions, mixed $result) : mixed
Parameters
$http_response_header : array<string|int, mixed>
$additionalOptions : array<string|int, mixed>
$result : mixed
Return values
mixed

isPublicBitBucketDownload()

private isPublicBitBucketDownload(string $urlToBitBucketFile) : bool
Parameters
$urlToBitBucketFile : string

URL to a file at bitbucket.org.

Tags
link
https://github.com/composer/composer/issues/5584
Return values
bool

Whether the given URL is a public BitBucket download which requires no authentication.

stripCredentialsFromUrl()

private stripCredentialsFromUrl(mixed $url) : mixed
Parameters
$url : mixed
Return values
mixed

Search results