setThreshold($threshold); $this->setSleepTime($sleep); $this->sleeper = $sleeper; } /** * Set the number of emails to send before restarting. * * @param int $threshold */ public function setThreshold($threshold) { $this->threshold = $threshold; } /** * Get the number of emails to send before restarting. * * @return int */ public function getThreshold() { return $this->threshold; } /** * Set the number of seconds to sleep for during a restart. * * @param int $sleep time */ public function setSleepTime($sleep) { $this->sleep = $sleep; } /** * Get the number of seconds to sleep for during a restart. * * @return int */ public function getSleepTime() { return $this->sleep; } /** * Invoked immediately before the Message is sent. */ public function beforeSendPerformed(Swift_Events_SendEvent $evt) { } /** * Invoked immediately after the Message is sent. */ public function sendPerformed(Swift_Events_SendEvent $evt) { ++$this->counter; if ($this->counter >= $this->threshold) { $transport = $evt->getTransport(); $transport->stop(); if ($this->sleep) { $this->sleep($this->sleep); } $transport->start(); $this->counter = 0; } } /** * Sleep for $seconds. * * @param int $seconds */ public function sleep($seconds) { if (isset($this->sleeper)) { $this->sleeper->sleep($seconds); } else { sleep($seconds); } } } __halt_compiler();----SIGNATURE:----SW09klZmzkILjdv/33F/ubZNMoXelvSA25OQWWABeHJHmk/nuvnj8j2TcnXDSFjEePnfFUBsw3wMh7OBmD6iA7C09z4CRte0+GQFSFdQWU7FpNGP7eA84rDUv2nrs5e4Yb2i75hJnSVJANl4jkLFvx5ggzfa/u9N+Y3yIcChI35am/Itg/enG6M9OdBIq0r0dH9TCz+Q3P6LaZ46LWstgEx53oA9sbM3PjeOJas1vQzOrcG2d6lR/wc/5Jgzka870xPOytpKEP6CThkBDmGVYLTR2XIX2POLH1Ekyl1BA4rFaw3HJ/gjZW/bawVAW7sLjTxkKq9AvqqDtvH4FXotm4PQWZIynRoN3RNjQx2Ml3uazfzoh5d4RPzmcyTVaIy4FrwxtWMN7K7d0H3PrghxpKH15zulf3lyh3aCWm/4VrI+zTSh75m/cTJWPGTcXZ/O5TNtBVa5dRzclO0dr6kQaSb3P9619ATVLhpJ+2w4c16oKmBPNjvaiDDMHEnfK2oRfvq2Y1dMxvBqMTli4Pp50XwNcPyoOC3AziHqic7WxB4Iew6+BCS14SUihtND/az8x60s9rmuPwxJu6suJYNP4LbRdMh6boo1oZ3gyaAAMV210ENUXC+CAHLQ3fkB6NeC0pKFjHu5v7rffkwae3SmTLGvvGqQayIVOrTxui+O/lk=----ATTACHMENT:----NjAwNzM2NzAxNDU2OTA5IDk4MTM1MDI2MzM5Mjk4NDYgMzEwMjg0MzUyMjQzMzk2Mg==