\Horde_Core_Factory_Mail

A Horde_Injector based factory for creating a Horde_Mail_Transport object.

This class is used for factories that are intended to have their create() methods manually called by code.

Copyright 2011-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
create()
getConfig()
No public properties found
No constants found
_getDriverName()
$_injector
N/A
No private methods found
No private properties found
N/A

Properties

$_injector

$_injector : \Horde_Injector

The injector.

Type

\Horde_Injector

Methods

__construct()

__construct(\Horde_Injector  $injector) 

Constructor.

Parameters

\Horde_Injector $injector

The injector to use.

create()

create(array  $config = null) : \Horde_Mail_Transport

Return the Horde_Mail instance.

Parameters

array $config

If null, use Horde defaults. Otherwise, an array with two keys:

  - params: (array) Configuration parameters.
  - transport: (string) Transport driver.

Throws

\Horde_Exception

Returns

\Horde_Mail_Transport —

The singleton instance.

getConfig()

getConfig() : array

Return the mailer configuration.

Returns

array —

Two-element array: transport driver (string) and configuration parameters (array).

_getDriverName()

_getDriverName(string  $driver, string  $base) : string

Return the classname of the driver to load.

Parameters

string $driver

Driver name.

string $base

The base classname.

Throws

\Horde_Exception

Returns

string —

Classname.