SmtpAgent.php 937B

12345678910111213141516171819202122232425262728293031323334353637
  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. * Wraps an IoBuffer to send/receive SMTP commands/responses.
  11. * @package Swift
  12. * @subpackage Transport
  13. * @author Chris Corbyn
  14. */
  15. interface Swift_Transport_SmtpAgent
  16. {
  17. /**
  18. * Get the IoBuffer where read/writes are occurring.
  19. * @return Swift_Transport_IoBuffer
  20. */
  21. public function getBuffer();
  22. /**
  23. * Run a command against the buffer, expecting the given response codes.
  24. * If no response codes are given, the response will not be validated.
  25. * If codes are given, an exception will be thrown on an invalid response.
  26. * @param string $command
  27. * @param int[] $codes
  28. * @param string[] &$failures
  29. */
  30. public function executeCommand($command, $codes = array(), &$failures = null);
  31. }