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:----cuzkQdRhgSOlW9zwrqVDdqKUgEAZV2vPD0/5ssT9I1q+Q0/CabOSYsT7AZvlcd4ohrljNbImIdBOobD3xPViOSxGUMV7M5+Hsp6I7igtN8P/G18/lD0UcEHWzuB/c2KcLqo65gF+C1iyhQXm8xtCC+0SOu0cFXLmBimuPPIGqQ/O2nsTLBbFjQMmQnlHCj5OOlBTIjZ9sJx6e8h81UBnXCq6+zplP3o6o6jLfdP78MGkkY2QUmW6plcyzJjEzHE3zq//9T2TSwgajlja/gKvCpyLvGY4fdd+Rdhj4sP4aB30MLb1gt1j7HBRz7bJCpSkeT4uQ8fO3HHAu+xjaOqSSc5yhNjS/2Ij2wB/ecrlJGlFjVE6oEbjYN1YTysMwvvOSvhGSO5yLdyz+C5ivqGu3nHKRaEz53FqZfFN2elza7Wwdqqgd5pN2cjuE8du0apRDbrgAtVYhvVbYZ6Y/JzBe8aM2GWArRxwL2m01Y51d7H2L8sl/lTOmNEM23vK9uxpdKmGqAAhqBliNu32HbtM8fyj5Nj37ppaE4bEP37l8BPiJCOb6Y6rC+jdEg8i1nvUEHSDirg+9QwVw+dqm6DfFQ/Ax/PPxvEB7C9MtWvHMhoepj+BPBqr6ogueq7HXupkgXHlKVPYq3p18+bvLsIBUnQhImo16Su5cGxg0Utu6JA=----ATTACHMENT:----NTA3MjY4NjkwNjMzNTIxIDI0Mjc3Nzk4NTQ1NDIzMTYgNzI3Njk5NDQzODM2OTEyNw==