OutputHandlerFactory
in package
OutputHandlers can either be the standard core ones: print/pdf/csv, or extensions can add their own.
Table of Contents
Properties
- $registered : array<string|int, mixed>
- $singleton : mixed
Methods
- create() : OutputHandlerInterface|null
- Return an OutputHandler based on the parameters.
- register() : mixed
- Register an outputHandler to handle an output format.
- singleton() : OutputHandlerFactory
- Singleton function.
- registerBuiltins() : mixed
- There are some handlers that were hard-coded in to the form before which have now been moved to outputhandlers.
Properties
$registered
protected
static array<string|int, mixed>
$registered
= []
Array of registered possible OutputHandlers.
$singleton
protected
static mixed
$singleton
Methods
create()
Return an OutputHandler based on the parameters.
public
create(CRM_Report_Form $form) : OutputHandlerInterface|null
Parameters
- $form : CRM_Report_Form
-
A CiviReport that extends CRM_Report_Form.
Return values
OutputHandlerInterface|null —An object that implements the OutputHandlerInterface, or NULL if nothing suitable for the given parameters.
register()
Register an outputHandler to handle an output format.
public
register(string $outputHandler) : mixed
Parameters
- $outputHandler : string
-
The classname of a class that implements OutputHandlerInterface.
singleton()
Singleton function.
public
static singleton() : OutputHandlerFactory
Return values
OutputHandlerFactoryregisterBuiltins()
There are some handlers that were hard-coded in to the form before which have now been moved to outputhandlers.
private
static registerBuiltins() : mixed