Documentation

Downloader
in package

Tags
author

Fabien Potencier fabien@symfony.com

author

Nicolas Grekas p@tchwork.com

Table of Contents

DEFAULT_ENDPOINTS  = ['https://raw.githubusercontent.com/symfony/recipes/flex/main/index.json', 'https://raw.githubusercontent.com/symfony/recipes-contrib/flex/main/index.json']
MAX_LENGTH  = 1000
$aliases  : mixed
$cache  : mixed
$caFile  : mixed
$composer  : mixed
$conflicts  : mixed
$degradedMode  : mixed
$enabled  : mixed
$endpoints  : mixed
$index  : mixed
$io  : mixed
$legacyEndpoint  : mixed
$rfs  : HttpDownloader|ParallelDownloader
$sess  : mixed
$versions  : mixed
__construct()  : mixed
disable()  : mixed
getAliases()  : mixed
getRecipes()  : array<string|int, mixed>
Downloads recipes.
getSessionId()  : string
getVersions()  : mixed
isEnabled()  : mixed
removeRecipeFromIndex()  : mixed
Used to "hide" a recipe version so that the next most-recent will be returned.
setFlexId()  : mixed
generateCacheKey()  : string
get()  : array<string|int, mixed>
Fetches and decodes JSON HTTP response bodies.
getOptions()  : array<string|int, mixed>
initialize()  : mixed
parseJson()  : Response
switchToDegradedMode()  : mixed

Constants

DEFAULT_ENDPOINTS

private mixed DEFAULT_ENDPOINTS = ['https://raw.githubusercontent.com/symfony/recipes/flex/main/index.json', 'https://raw.githubusercontent.com/symfony/recipes-contrib/flex/main/index.json']

Properties

$degradedMode

private mixed $degradedMode = false

Methods

__construct()

public __construct(Composer $composer, IOInterface $io, mixed $rfs) : mixed
Parameters
$composer : Composer
$io : IOInterface
$rfs : mixed
Return values
mixed

disable()

public disable() : mixed
Return values
mixed

getAliases()

public getAliases() : mixed
Return values
mixed

getRecipes()

Downloads recipes.

public getRecipes(array<string|int, OperationInterface$operations) : array<string|int, mixed>
Parameters
$operations : array<string|int, OperationInterface>
Return values
array<string|int, mixed>

getSessionId()

public getSessionId() : string
Return values
string

getVersions()

public getVersions() : mixed
Return values
mixed

isEnabled()

public isEnabled() : mixed
Return values
mixed

removeRecipeFromIndex()

Used to "hide" a recipe version so that the next most-recent will be returned.

public removeRecipeFromIndex(string $packageName, string $version) : mixed

This is used when resolving "conflicts".

Parameters
$packageName : string
$version : string
Return values
mixed

setFlexId()

public setFlexId([string $id = null ]) : mixed
Parameters
$id : string = null
Return values
mixed

generateCacheKey()

private static generateCacheKey(string $url) : string
Parameters
$url : string
Return values
string

get()

Fetches and decodes JSON HTTP response bodies.

private get(array<string|int, mixed> $urls[, bool $isRecipe = false ][, int $try = 3 ]) : array<string|int, mixed>
Parameters
$urls : array<string|int, mixed>
$isRecipe : bool = false
$try : int = 3
Return values
array<string|int, mixed>

getOptions()

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

initialize()

private initialize() : mixed
Return values
mixed

parseJson()

private parseJson(string $json, string $url, string $cacheKey, array<string|int, mixed> $lastHeaders) : Response
Parameters
$json : string
$url : string
$cacheKey : string
$lastHeaders : array<string|int, mixed>
Return values
Response

switchToDegradedMode()

private switchToDegradedMode(Exception $e, string $url) : mixed
Parameters
$e : Exception
$url : string
Return values
mixed

Search results