Collection
in package
A collection of Writer objects.
In this collection we can receive writers.
In addition, this class can also verify if all requirements for the various writers in it are met.
Table of Contents
- $writers : array<string, WriterAbstract>
- __construct() : mixed
- checkRequirements() : void
- Iterates over each writer in this collection and checks its requirements.
- get() : WriterAbstract
- Retrieves a writer from the collection.
- register() : void
Properties
$writers
private
array<string, WriterAbstract>
$writers
= []
Methods
__construct()
public
__construct([iteratable<string, WriterAbstract> $writers = [] ]) : mixed
Parameters
- $writers : iteratable<string, WriterAbstract> = []
Return values
mixed —checkRequirements()
Iterates over each writer in this collection and checks its requirements.
public
checkRequirements() : void
Tags
Return values
void —get()
Retrieves a writer from the collection.
public
get(string $index) : WriterAbstract
Parameters
- $index : string
-
the name of the writer to retrieve.
Tags
Return values
WriterAbstract —register()
public
register(WriterAbstract $writer) : void
Parameters
- $writer : WriterAbstract