bluzphp /
framework
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * Bluz Framework Component |
||
| 5 | * |
||
| 6 | * @copyright Bluz PHP Team |
||
| 7 | * @link https://github.com/bluzphp/framework |
||
| 8 | */ |
||
| 9 | |||
| 10 | declare(strict_types=1); |
||
| 11 | |||
| 12 | namespace Bluz\Proxy; |
||
| 13 | |||
| 14 | use Bluz\Common\Exception\ConfigurationException; |
||
| 15 | use Bluz\Mailer\Mailer as Instance; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Proxy to Mailer |
||
| 19 | * |
||
| 20 | * Example of usage |
||
| 21 | * <code> |
||
| 22 | * use Bluz\Proxy\Mailer; |
||
| 23 | * |
||
| 24 | * $mail = Mailer::create(); |
||
| 25 | * $mail->From = '[email protected]'; |
||
| 26 | * $mail->Subject = 'Here is the subject'; |
||
| 27 | * // ... |
||
| 28 | * Mailer::send($mail); |
||
| 29 | * </code> |
||
| 30 | * |
||
| 31 | * @package Bluz\Proxy |
||
| 32 | * @author Anton Shevchuk |
||
| 33 | * |
||
| 34 | * @method static Instance getInstance() |
||
| 35 | * |
||
| 36 | * @method static \PHPMailer\PHPMailer\PHPMailer create() |
||
| 37 | * @see Instance::create() |
||
| 38 | * |
||
| 39 | * @method static bool send(\PHPMailer\PHPMailer\PHPMailer $mail) |
||
| 40 | * @see Instance::send() |
||
| 41 | */ |
||
| 42 | final class Mailer |
||
| 43 | { |
||
| 44 | use ProxyTrait; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Init instance |
||
| 48 | * |
||
| 49 | * @return Instance |
||
| 50 | * @throws ConfigurationException |
||
| 51 | */ |
||
| 52 | 1 | private static function initInstance(): Instance |
|
|
0 ignored issues
–
show
|
|||
| 53 | { |
||
| 54 | 1 | $instance = new Instance(); |
|
| 55 | 1 | $instance->setOptions(Config::get('mailer')); |
|
| 56 | 1 | $instance->init(); |
|
| 57 | 1 | return $instance; |
|
| 58 | } |
||
| 59 | } |
||
| 60 |
This check looks for private methods that have been defined, but are not used inside the class.