Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
 1: <?php
 2: 
 3: /*
 4:  * This file is part of SwiftMailer.
 5:  * (c) 2011 Fabien Potencier <fabien.potencier@gmail.com>
 6:  *
 7:  * For the full copyright and license information, please view the LICENSE
 8:  * file that was distributed with this source code.
 9:  */
10: 
11: /**
12:  * Stores Messages in memory.
13:  * @package Swift
14:  * @author  Fabien Potencier
15:  */
16: class Swift_MemorySpool implements Swift_Spool
17: {
18:     protected $messages = array();
19: 
20:     /**
21:      * Tests if this Transport mechanism has started.
22:      * @return boolean
23:      */
24:     public function isStarted()
25:     {
26:         return true;
27:     }
28: 
29:     /**
30:      * Starts this Transport mechanism.
31:      */
32:     public function start()
33:     {
34:     }
35: 
36:     /**
37:      * Stops this Transport mechanism.
38:      */
39:     public function stop()
40:     {
41:     }
42: 
43:     /**
44:      * Stores a message in the queue.
45:      *
46:      * @param Swift_Mime_Message $message The message to store
47:      *
48:      * @return boolean Whether the operation has succeeded
49:      */
50:     public function queueMessage(Swift_Mime_Message $message)
51:     {
52:         $this->messages[] = $message;
53: 
54:         return true;
55:     }
56: 
57:     /**
58:      * Sends messages using the given transport instance.
59:      *
60:      * @param Swift_Transport $transport A transport instance
61:      * @param string[]        &$failedRecipients An array of failures by-reference
62:      *
63:      * @return int The number of sent emails
64:      */
65:     public function flushQueue(Swift_Transport $transport, &$failedRecipients = null)
66:     {
67:         if (!$this->messages) {
68:             return 0;
69:         }
70: 
71:         if (!$transport->isStarted()) {
72:             $transport->start();
73:         }
74: 
75:         $count = 0;
76:         while ($message = array_pop($this->messages)) {
77:             $count += $transport->send($message, $failedRecipients);
78:         }
79: 
80:         return $count;
81:     }
82: }
83: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen