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:----GlIPvqCfvwC96W4/yBS5OsZdEJbmte0pOyjRKAJl7mBkV4xIe+KGmu8NekdxUXZC/y5SdWS6lDKkGFW5AZYFAq9dTR1ERZvds2AHwhraCHJnAPyIF16dEiz+N1gNXE/atIQrANUjWqy0QYJSFXZA7MWmN/ggLZ2O8GXKLDdMlSRErd3mSC6o5ESigi1FcwSK1FC5l4qsN8Uxx3awZZXxotJdS5OPcyluv+SqWvr7T6on7PFsyGFvXZwBqJCqpJL20a1/3QBiD/tOQSgDf2fP/PS53hH0EiRabgRQbQOxJjO4URqXqz12Z6cXrhE7Y8vjQ/cBUp6/sdecZpL26sh1X/QWCu3Ub6UA2YTqXWcsL/B2HI4jCaycYlecM87s6MOrfeDbkGGqJL9L67QjDPKVJVOv4EVud8KpOrk9oTxjXwxsyNnYx/zlozVL+LjaOEbPcTRyaNVtsgAk5E2jRkQrT46e6p49yGez7NfTvWJ97Qict/8Xk3NqVxf55Tq92l5N78N7Q6w6+h+yv9vXf4EKto9LffL31jZCubXU0GhzFOXmLjif71Lp6348/mey8Z2165ErUV4c+d6Gn3C1Ope3M4YaT+ir1/OmwWnYo0+bZ8Dkap9LwImaMgWnEMLIDFq9ttUnBvwS07Le0tO3PPB4LWyB5igKSGVqhGAPPQ+a564=----ATTACHMENT:----NzAxMzk5NjY1OTgxNzQyMCA0MDA2OTczNjUyNjkzNzI3IDg5Njg4NDIzNjgxNDk5MjU=