Horde_Core_Factory_Mail
extends Horde_Core_Factory_Base
in package
A Horde_Injector based factory for creating a Horde_Mail_Transport object.
Tags
Table of Contents
Properties
- $_injector : Horde_Injector
- The injector.
Methods
- __construct() : mixed
- Constructor.
- create() : Horde_Mail_Transport
- Return the Horde_Mail instance.
- getConfig() : array<string|int, mixed>
- Return the mailer configuration.
- _getDriverName() : string
- Return the classname of the driver to load.
Properties
$_injector
The injector.
protected
Horde_Injector
$_injector
Methods
__construct()
Constructor.
public
__construct(Horde_Injector $injector) : mixed
Parameters
- $injector : Horde_Injector
-
The injector to use.
create()
Return the Horde_Mail instance.
public
create([array<string|int, mixed> $config = null ]) : Horde_Mail_Transport
Parameters
- $config : array<string|int, mixed> = null
-
If null, use Horde defaults. Otherwise, an array with two keys:
- params: (array) Configuration parameters. - transport: (string) Transport driver.
Tags
Return values
Horde_Mail_Transport —The singleton instance.
getConfig()
Return the mailer configuration.
public
getConfig() : array<string|int, mixed>
Return values
array<string|int, mixed> —Two-element array: transport driver (string) and configuration parameters (array).
_getDriverName()
Return the classname of the driver to load.
protected
_getDriverName(string $driver, string $base) : string
Parameters
- $driver : string
-
Driver name.
- $base : string
-
The base classname.
Tags
Return values
string —Classname.