public static function create()
    {
        $builder = NotifireBuilder::create();

        if (\class_exists('Swift_Mailer')) {
            $transport = new \Swift_SmtpTransport('localhost', 25);
            $mailer = new \Swift_Mailer($transport);

            $handler = new SwiftMailerHandler($mailer, 'default');
            if (\class_exists('Twig_Environment')) {
                $env = new \Twig_Environment(new \Twig_Loader_Filesystem());
                $handler->setTwig($env);
            }

            $builder->addHandler($handler);
            $builder->addNotification('email', Email::class);
        }

        $builder->initialize();
    }
public static function create()
    {
        $builder = NotifireBuilder::create();

        if (\class_exists('Swift_Mailer')) {
            $transport = new \Swift_SmtpTransport('localhost', 25);
            $mailer = new \Swift_Mailer($transport);

            $handler = new SwiftMailerHandler($mailer, 'default');
            if (\class_exists('Twig_Environment')) {
                $env = new \Twig_Environment(new \Twig_Loader_Filesystem());
                $handler->setTwig($env);
            }

            $builder->addHandler($handler);
            $builder->addNotification('email', Email::class);
        }

        $builder->initialize();
    }
public static function create ( ) { $ builder = NotifireBuilder :: create ( ) ; if ( \ class_exists ( 'Swift_Mailer' ) ) { $ transport = new \ Swift_SmtpTransport ( 'localhost' , 25 ) ; $ mailer = new \ Swift_Mailer ( $ transport ) ; $ handler = new SwiftMailerHandler ( $ mailer , 'default' ) ; if ( \ class_exists ( 'Twig_Environment' ) ) { $ env = new \ Twig_Environment ( new \ Twig_Loader_Filesystem ( ) ) ; $ handler -> setTwig ( $ env ) ; } $ builder -> addHandler ( $ handler ) ; $ builder -> addNotification ( 'email' , Email :: class ) ; } $ builder -> initialize ( ) ; }
Configuration shortcut to a base library initialization.
Configuration shortcut to a base library initialization .