class FailoverTransport
Uses several Transports using a failover algorithm.
@author Fabien Potencier <fabien@symfony.com>
Hierarchy
- class \Symfony\Component\Mailer\Transport\RoundRobinTransport implements \Symfony\Component\Mailer\Transport\TransportInterface
- class \Symfony\Component\Mailer\Transport\FailoverTransport extends \Symfony\Component\Mailer\Transport\RoundRobinTransport
Expanded class hierarchy of FailoverTransport
1 file declares its use of FailoverTransport
- Transport.php in vendor/
symfony/ mailer/ Transport.php
File
-
vendor/
symfony/ mailer/ Transport/ FailoverTransport.php, line 19
Namespace
Symfony\Component\Mailer\TransportView source
class FailoverTransport extends RoundRobinTransport {
private ?TransportInterface $currentTransport = null;
protected function getNextTransport() : ?TransportInterface {
if (null === $this->currentTransport || $this->isTransportDead($this->currentTransport)) {
$this->currentTransport = parent::getNextTransport();
}
return $this->currentTransport;
}
protected function getInitialCursor() : int {
return 0;
}
protected function getNameSymbol() : string {
return 'failover';
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
FailoverTransport::$currentTransport | private | property | ||
FailoverTransport::getInitialCursor | protected | function | Overrides RoundRobinTransport::getInitialCursor | |
FailoverTransport::getNameSymbol | protected | function | Overrides RoundRobinTransport::getNameSymbol | |
FailoverTransport::getNextTransport | protected | function | Rotates the transport list around and returns the first instance. | Overrides RoundRobinTransport::getNextTransport |
RoundRobinTransport::$cursor | private | property | ||
RoundRobinTransport::$deadTransports | private | property | ||
RoundRobinTransport::isTransportDead | protected | function | ||
RoundRobinTransport::moveCursor | private | function | ||
RoundRobinTransport::send | public | function | Overrides TransportInterface::send | |
RoundRobinTransport::__construct | public | function | ||
RoundRobinTransport::__toString | public | function |