Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 18.223.125.111
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/vendor/swiftmailer/swiftmailer/doc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/vendor/swiftmailer/swiftmailer/doc/including-the-files.rst
Including Swift Mailer (Autoloading)
====================================

If you are using Composer, Swift Mailer will be automatically autoloaded.

If not, you can use the built-in autoloader by requiring the
``swift_required.php`` file::

    require_once '/path/to/swift-mailer/lib/swift_required.php';

    /* rest of code goes here */

If you want to override the default Swift Mailer configuration, call the
``init()`` method on the ``Swift`` class and pass it a valid PHP callable (a
PHP function name, a PHP 5.3 anonymous function, ...)::

    require_once '/path/to/swift-mailer/lib/swift_required.php';

    function swiftmailer_configurator() {
        // configure Swift Mailer

        Swift_DependencyContainer::getInstance()->...
        Swift_Preferences::getInstance()->...
    }

    Swift::init('swiftmailer_configurator');

    /* rest of code goes here */

The advantage of using the ``init()`` method is that your code will be
executed only if you use Swift Mailer in your script.

.. note::

    While Swift Mailer's autoloader is designed to play nicely with other
    autoloaders, sometimes you may have a need to avoid using Swift Mailer's
    autoloader and use your own instead. Include the ``swift_init.php``
    instead of the ``swift_required.php`` if you need to do this. The very
    minimum include is the ``swift_init.php`` file since Swift Mailer will not
    work without the dependency injection this file sets up:

    .. code-block:: php

        require_once '/path/to/swift-mailer/lib/swift_init.php';

        /* rest of code goes here */

Anon7 - 2022
AnonSec Team