FailoverTransport.php 865 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2004-2009 Chris Corbyn
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * Contains a list of redundant Transports so when one fails, the next is used.
  11. *
  12. * @author Chris Corbyn
  13. */
  14. class Swift_FailoverTransport extends Swift_Transport_FailoverTransport
  15. {
  16. /**
  17. * Creates a new FailoverTransport with $transports.
  18. *
  19. * @param Swift_Transport[] $transports
  20. */
  21. public function __construct($transports = [])
  22. {
  23. \call_user_func_array(
  24. [$this, 'Swift_Transport_FailoverTransport::__construct'],
  25. Swift_DependencyContainer::getInstance()
  26. ->createDependenciesFor('transport.failover')
  27. );
  28. $this->setTransports($transports);
  29. }
  30. }