Collection
in package
FinalYes
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
Properties
- $writers : array<string, WriterAbstract>
Methods
- __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([iterable<string, WriterAbstract> $writers = [] ]) : mixed
Parameters
- $writers : iterable<string, WriterAbstract> = []
checkRequirements()
Iterates over each writer in this collection and checks its requirements.
public
checkRequirements() : void
Tags
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
WriterAbstractregister()
public
register(WriterAbstract $writer) : void
Parameters
- $writer : WriterAbstract