Preference Configuration
The Preference Configuration class provides methods to specify preferred components, such as logging and mailing, to be used in a Luminova application instead of relying only on the default components.
- Class namespace:
\App\Config\Preference - File path:
/app/Config/Preference.php - This class is marked as final and can't be subclassed
Methods
getLogger
Return instance of your preferred logger class.
public getLogger(): \Psr\Log\LoggerInterface|nullYour logger class must implement psr LoggerInterface.
Return Value:
\Psr\Log\LoggerInterface|null - Return preferred logger instance or null to use default logger.
getMailer
Return instance of your preferred mail client.
public getMailer(): \Luminova\Interface\MailerInterface|nullYour mail client class must implement Luminova MailerInterface.
Optionally you can use any of available mail client
\Luminova\Email\Clients\PHPMailer,\Luminova\Email\Clients\SwiftMailer
Return Value:
\Luminova\Interface\MailerInterface|null - Return preferred logger instance or null to use default logger.