NullTransport.php 930B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. *
  12. * @package Swift
  13. * @author Fabien Potencier
  14. */
  15. class Swift_NullTransport extends Swift_Transport_NullTransport
  16. {
  17. /**
  18. * Create a new NullTransport.
  19. */
  20. public function __construct()
  21. {
  22. call_user_func_array(
  23. array($this, 'Swift_Transport_NullTransport::__construct'),
  24. Swift_DependencyContainer::getInstance()
  25. ->createDependenciesFor('transport.null')
  26. );
  27. }
  28. /**
  29. * Create a new NullTransport instance.
  30. *
  31. * @return Swift_NullTransport
  32. */
  33. public static function newInstance()
  34. {
  35. return new self();
  36. }
  37. }