Documentation

EnvConfigurator extends AbstractConfigurator
in package

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$composer  : mixed
$io  : mixed
$options  : mixed
$path  : mixed
__construct()  : mixed
configure()  : mixed
unconfigure()  : mixed
update()  : void
extractSection()  : string|null
isFileMarked()  : bool
isFileXmlMarked()  : bool
markData()  : string
markXmlData()  : string
updateData()  : bool
updateDataString()  : string|null
write()  : mixed
configureEnvDist()  : mixed
configurePhpUnit()  : mixed
evaluateValue()  : mixed
Evaluates expressions like %generate(secret)%.
findExistingValue()  : string|null
Attempts to find the existing value of an environment variable.
generateRandomBytes()  : mixed
getContentsAfterApplyingRecipe()  : array<string|int, mixed>
unconfigureEnvFiles()  : mixed
unconfigurePhpUnit()  : mixed

Properties

Methods

__construct()

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

configure()

public configure(Recipe $recipe, mixed $vars, Lock $lock[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$recipe : Recipe
$vars : mixed
$lock : Lock
$options : array<string|int, mixed> = []
Return values
mixed

update()

public update(RecipeUpdate $recipeUpdate, array<string|int, mixed> $originalConfig, array<string|int, mixed> $newConfig) : void
Parameters
$recipeUpdate : RecipeUpdate
$originalConfig : array<string|int, mixed>
$newConfig : array<string|int, mixed>
Return values
void

extractSection()

protected extractSection(Recipe $recipe, string $contents) : string|null
Parameters
$recipe : Recipe
$contents : string
Return values
string|null

isFileXmlMarked()

protected isFileXmlMarked(Recipe $recipe, string $file) : bool
Parameters
$recipe : Recipe
$file : string
Return values
bool

updateData()

protected updateData(string $file, string $data) : bool
Parameters
$file : string
$data : string
Return values
bool

True if section was found and replaced

updateDataString()

protected updateDataString(string $contents, string $data) : string|null
Parameters
$contents : string
$data : string
Return values
string|null

returns the updated content if the section was found, null if not found

write()

protected write(mixed $messages[, mixed $verbosity = IOInterface::VERBOSE ]) : mixed
Parameters
$messages : mixed
$verbosity : mixed = IOInterface::VERBOSE
Return values
mixed

configureEnvDist()

private configureEnvDist(Recipe $recipe, mixed $vars, bool $update) : mixed
Parameters
$recipe : Recipe
$vars : mixed
$update : bool
Return values
mixed

configurePhpUnit()

private configurePhpUnit(Recipe $recipe, mixed $vars, bool $update) : mixed
Parameters
$recipe : Recipe
$vars : mixed
$update : bool
Return values
mixed

evaluateValue()

Evaluates expressions like %generate(secret)%.

private evaluateValue(mixed $value[, string $originalValue = null ]) : mixed

If $originalValue is passed, and the value contains an expression. the $originalValue is used.

Parameters
$value : mixed
$originalValue : string = null
Return values
mixed

findExistingValue()

Attempts to find the existing value of an environment variable.

private findExistingValue(string $var, string $filename, Recipe $recipe) : string|null
Parameters
$var : string
$filename : string
$recipe : Recipe
Return values
string|null

generateRandomBytes()

private generateRandomBytes([mixed $length = 16 ]) : mixed
Parameters
$length : mixed = 16
Return values
mixed

getContentsAfterApplyingRecipe()

private getContentsAfterApplyingRecipe(string $rootDir, Recipe $recipe, array<string|int, mixed> $vars) : array<string|int, mixed>
Parameters
$rootDir : string
$recipe : Recipe
$vars : array<string|int, mixed>
Return values
array<string|int, mixed>

unconfigureEnvFiles()

private unconfigureEnvFiles(Recipe $recipe, mixed $vars) : mixed
Parameters
$recipe : Recipe
$vars : mixed
Return values
mixed

unconfigurePhpUnit()

private unconfigurePhpUnit(Recipe $recipe, mixed $vars) : mixed
Parameters
$recipe : Recipe
$vars : mixed
Return values
mixed

Search results