NullTransport.php 864B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2009 Fabien Potencier <fabien.potencier@gmail.com>
  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. * Pretends messages have been sent, but just ignores them.
  11. * @package Swift
  12. * @author Fabien Potencier
  13. */
  14. class Swift_NullTransport extends Swift_Transport_NullTransport
  15. {
  16. /**
  17. * Create a new NullTransport.
  18. */
  19. public function __construct()
  20. {
  21. call_user_func_array(
  22. array($this, 'Swift_Transport_NullTransport::__construct'),
  23. Swift_DependencyContainer::getInstance()
  24. ->createDependenciesFor('transport.null')
  25. );
  26. }
  27. /**
  28. * Create a new NullTransport instance.
  29. * @return Swift_NullTransport
  30. */
  31. public static function newInstance()
  32. {
  33. return new self();
  34. }
  35. }