Documentation

AddLinesConfigurator extends AbstractConfigurator
in package

Tags
author

Kevin Bond kevinbond@gmail.com

author

Ryan Weaver ryan@symfonycasts.com

Table of Contents

Constants

POSITION_AFTER_TARGET  = 'after_target'
POSITION_BOTTOM  = 'bottom'
POSITION_TOP  = 'top'
VALID_POSITIONS  = [self::POSITION_TOP, self::POSITION_BOTTOM, self::POSITION_AFTER_TARGET]

Properties

$composer  : mixed
$io  : mixed
$options  : mixed
$path  : mixed

Methods

__construct()  : mixed
configure()  : void
unconfigure()  : void
update()  : void
extractSection()  : string|null
isFileMarked()  : bool
isFileXmlMarked()  : bool
markData()  : string
markXmlData()  : string
updateData()  : bool
updateDataString()  : string|null
write()  : mixed
isPackageInstalled()  : bool
patchFile()  : mixed
unPatchFile()  : mixed

Constants

VALID_POSITIONS

private mixed VALID_POSITIONS = [self::POSITION_TOP, self::POSITION_BOTTOM, self::POSITION_AFTER_TARGET]

Properties

Methods

__construct()

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

configure()

public configure(Recipe $recipe, mixed $config, Lock $lock[, array<string|int, mixed> $options = [] ]) : void
Parameters
$recipe : Recipe
$config : mixed
$lock : Lock
$options : array<string|int, 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>

extractSection()

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

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

isPackageInstalled()

private isPackageInstalled(mixed $packages) : bool
Parameters
$packages : mixed
Return values
bool

patchFile()

private patchFile(string $file, string $value, string $position, string|null $target, bool $warnIfMissing) : mixed
Parameters
$file : string
$value : string
$position : string
$target : string|null
$warnIfMissing : bool

unPatchFile()

private unPatchFile(string $file, mixed $value) : mixed
Parameters
$file : string
$value : mixed

        
On this page

Search results