rest_mediatekdocuments

GuardedWriter
in package
implements WriterInterface

FinalYes

Table of Contents

Interfaces

WriterInterface

Properties

$allowList  : array<string|int, string>
The variable name allow list.
$writer  : WriterInterface
The inner writer to use.

Methods

__construct()  : void
Create a new guarded writer instance.
delete()  : bool
Delete an environment variable, if possible.
write()  : bool
Write to an environment variable, if possible.
isAllowed()  : bool
Determine if the given variable is allowed.

Properties

$allowList

The variable name allow list.

private array<string|int, string> $allowList

Methods

__construct()

Create a new guarded writer instance.

public __construct(WriterInterface $writer, array<string|int, string> $allowList) : void
Parameters
$writer : WriterInterface
$allowList : array<string|int, string>

delete()

Delete an environment variable, if possible.

public delete(non-empty-string $name) : bool
Parameters
$name : non-empty-string
Return values
bool

write()

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
bool

isAllowed()

Determine if the given variable is allowed.

private isAllowed(non-empty-string $name) : bool
Parameters
$name : non-empty-string
Return values
bool

        
On this page

Search results