DSNConfigurator
in package
Configure PHPMailer with DSN string.
Tags
Table of Contents
Methods
- configure() : PHPMailer
- Configure PHPMailer instance with DSN string.
- mailer() : PHPMailer
- Create new PHPMailer instance configured by DSN.
- parseUrl() : array<string|int, mixed>|false
- Parse a URL.
- applyConfig() : mixed
- Apply configuration to mailer.
- configureOptions() : mixed
- Configure options.
- configureSMTP() : mixed
- Configure SMTP.
- parseDSN() : array<string|int, mixed>
- Parse DSN string.
Methods
configure()
Configure PHPMailer instance with DSN string.
public
configure(PHPMailer $mailer, string $dsn) : PHPMailer
Parameters
- $mailer : PHPMailer
-
PHPMailer instance
- $dsn : string
-
DSN
Return values
PHPMailermailer()
Create new PHPMailer instance configured by DSN.
public
static mailer(string $dsn[, bool $exceptions = null ]) : PHPMailer
Parameters
- $dsn : string
-
DSN
- $exceptions : bool = null
-
Should we throw external exceptions?
Return values
PHPMailerparseUrl()
Parse a URL.
protected
parseUrl(string $url) : array<string|int, mixed>|false
Wrapper for the built-in parse_url function to work around a bug in PHP 5.5.
Parameters
- $url : string
-
URL
Return values
array<string|int, mixed>|falseapplyConfig()
Apply configuration to mailer.
private
applyConfig(PHPMailer $mailer, array<string|int, mixed> $config) : mixed
Parameters
- $mailer : PHPMailer
-
PHPMailer instance
- $config : array<string|int, mixed>
-
Configuration
Tags
configureOptions()
Configure options.
private
configureOptions(PHPMailer $mailer, array<string|int, mixed> $options) : mixed
Parameters
- $mailer : PHPMailer
-
PHPMailer instance
- $options : array<string|int, mixed>
-
Options
Tags
configureSMTP()
Configure SMTP.
private
configureSMTP(PHPMailer $mailer, array<string|int, mixed> $config) : mixed
Parameters
- $mailer : PHPMailer
-
PHPMailer instance
- $config : array<string|int, mixed>
-
Configuration
parseDSN()
Parse DSN string.
private
parseDSN(string $dsn) : array<string|int, mixed>
Parameters
- $dsn : string
-
DSN
Tags
Return values
array<string|int, mixed> —Configuration