ReplacingWriter
in package
implements
WriterInterface
FinalYes
Table of Contents
Interfaces
Properties
- $reader : ReaderInterface
- The inner reader to use.
- $seen : array<string, string>
- The record of seen variables.
- $writer : WriterInterface
- The inner writer to use.
Methods
- __construct() : void
- Create a new replacement writer instance.
- delete() : bool
- Delete an environment variable, if possible.
- write() : bool
- Write to an environment variable, if possible.
- exists() : bool
- Does the given environment variable exist.
Properties
$reader
The inner reader to use.
private
ReaderInterface
$reader
$seen
The record of seen variables.
private
array<string, string>
$seen
$writer
The inner writer to use.
private
WriterInterface
$writer
Methods
__construct()
Create a new replacement writer instance.
public
__construct(WriterInterface $writer, ReaderInterface $reader) : void
Parameters
- $writer : WriterInterface
- $reader : ReaderInterface
delete()
Delete an environment variable, if possible.
public
delete(non-empty-string $name) : bool
Parameters
- $name : non-empty-string
Return values
boolwrite()
Write to an environment variable, if possible.
public
write(non-empty-string $name, string $value) : bool
Parameters
- $name : non-empty-string
- $value : string
Return values
boolexists()
Does the given environment variable exist.
private
exists(non-empty-string $name) : bool
Returns true if it currently exists, or existed at any point in the past that we are aware of.
Parameters
- $name : non-empty-string