AddLinesConfigurator
extends AbstractConfigurator
in package
Tags
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
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
POSITION_AFTER_TARGET
private
mixed
POSITION_AFTER_TARGET
= 'after_target'
POSITION_BOTTOM
private
mixed
POSITION_BOTTOM
= 'bottom'
POSITION_TOP
private
mixed
POSITION_TOP
= 'top'
VALID_POSITIONS
private
mixed
VALID_POSITIONS
= [self::POSITION_TOP, self::POSITION_BOTTOM, self::POSITION_AFTER_TARGET]
Properties
$composer
protected
mixed
$composer
$io
protected
mixed
$io
$options
protected
mixed
$options
$path
protected
mixed
$path
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
unconfigure()
public
unconfigure(Recipe $recipe, mixed $config, Lock $lock) : void
Parameters
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|nullisFileMarked()
protected
isFileMarked(Recipe $recipe, string $file) : bool
Parameters
- $recipe : Recipe
- $file : string
Return values
boolisFileXmlMarked()
protected
isFileXmlMarked(Recipe $recipe, string $file) : bool
Parameters
- $recipe : Recipe
- $file : string
Return values
boolmarkData()
protected
markData(Recipe $recipe, string $data) : string
Parameters
- $recipe : Recipe
- $data : string
Return values
stringmarkXmlData()
protected
markXmlData(Recipe $recipe, string $data) : string
Parameters
- $recipe : Recipe
- $data : string
Return values
stringupdateData()
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
boolpatchFile()
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