MailServiceProvider

class MailServiceProvider extends ServiceProvider (View source)

Properties

protected Application $app The application instance. from ServiceProvider
protected bool $defer Indicates if loading of the provider is deferred.

Methods

void __construct(Application $app)

Create a new service provider instance.

from ServiceProvider
void boot()

Bootstrap the application events.

from ServiceProvider
void register()

Register the service provider.

void package(string $package, string $namespace = null, string $path = null)

Register the package's component namespaces.

from ServiceProvider
string guessPackagePath()

Guess the package path for the provider.

from ServiceProvider
string getPackageNamespace(string $package, string $namespace)

Determine the namespace for a package.

from ServiceProvider
void commands(array $commands)

Register the package's custom Artisan commands.

from ServiceProvider
string getAppViewPath(string $package)

Get the application package view path.

from ServiceProvider
array provides()

Get the services provided by the provider.

array when()

Get the events that trigger this service provider to register.

from ServiceProvider
bool isDeferred()

Determine if the provider is deferred.

from ServiceProvider
void setMailerDependencies(Mailer $mailer, Application $app)

Set a few dependencies on the mailer instance.

void registerSwiftMailer()

Register the Swift Mailer instance.

void registerSwiftTransport(array $config)

Register the Swift Transport instance.

void registerSmtpTransport(array $config)

Register the SMTP Swift Transport instance.

void registerSendmailTransport(array $config)

Register the Sendmail Swift Transport instance.

void registerMailTransport(array $config)

Register the Mail Swift Transport instance.

void registerMailgunTransport(array $config)

Register the Mailgun Swift Transport instance.

void registerMandrillTransport(array $config)

Register the Mandrill Swift Transport instance.

void registerLogTransport(array $config)

Register the "Log" Swift Transport instance.

Details

void __construct(Application $app)

Create a new service provider instance.

Parameters

Application $app

Return Value

void

void boot()

Bootstrap the application events.

Return Value

void

void register()

Register the service provider.

Return Value

void

void package(string $package, string $namespace = null, string $path = null)

Register the package's component namespaces.

Parameters

string $package
string $namespace
string $path

Return Value

void

string guessPackagePath()

Guess the package path for the provider.

Return Value

string

protected string getPackageNamespace(string $package, string $namespace)

Determine the namespace for a package.

Parameters

string $package
string $namespace

Return Value

string

void commands(array $commands)

Register the package's custom Artisan commands.

Parameters

array $commands

Return Value

void

protected string getAppViewPath(string $package)

Get the application package view path.

Parameters

string $package

Return Value

string

array provides()

Get the services provided by the provider.

Return Value

array

array when()

Get the events that trigger this service provider to register.

Return Value

array

bool isDeferred()

Determine if the provider is deferred.

Return Value

bool

protected void setMailerDependencies(Mailer $mailer, Application $app)

Set a few dependencies on the mailer instance.

Parameters

Mailer $mailer
Application $app

Return Value

void

void registerSwiftMailer()

Register the Swift Mailer instance.

Return Value

void

protected void registerSwiftTransport(array $config)

Register the Swift Transport instance.

Parameters

array $config

Return Value

void

Exceptions

InvalidArgumentException

protected void registerSmtpTransport(array $config)

Register the SMTP Swift Transport instance.

Parameters

array $config

Return Value

void

protected void registerSendmailTransport(array $config)

Register the Sendmail Swift Transport instance.

Parameters

array $config

Return Value

void

protected void registerMailTransport(array $config)

Register the Mail Swift Transport instance.

Parameters

array $config

Return Value

void

protected void registerMailgunTransport(array $config)

Register the Mailgun Swift Transport instance.

Parameters

array $config

Return Value

void

protected void registerMandrillTransport(array $config)

Register the Mandrill Swift Transport instance.

Parameters

array $config

Return Value

void

protected void registerLogTransport(array $config)

Register the "Log" Swift Transport instance.

Parameters

array $config

Return Value

void

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Mail/MailServiceProvider.html