You are here

interface SimplenewsSpoolInterface in Simplenews 7.2

Same name and namespace in other branches
  1. 7 includes/simplenews.source.inc \SimplenewsSpoolInterface

A Simplenews spool implementation is a factory for Simplenews sources.

Their main functionility is to return a number of sources based on the passed in array of mail spool rows. Additionally, it needs to return the processed mail rows after a source was sent.

@todo: Move spool functions into this interface.

Hierarchy

Expanded class hierarchy of SimplenewsSpoolInterface

All classes that implement SimplenewsSpoolInterface

Related topics

File

includes/simplenews.source.inc, line 204
Contains SimplenewsSource interface and implementations.

View source
interface SimplenewsSpoolInterface {

  /**
   * Initalizes the spool implementation.
   *
   * @param $spool_list
   *   An array of rows from the {simplenews_mail_spool} table.
   */
  function __construct($pool_list);

  /**
   * Returns a Simplenews source to be sent.
   *
   * A single source may represent any number of mail spool rows, e.g. by
   * addressing them as BCC.
   */
  function nextSource();

  /**
   * Returns the processed mail spool rows, keyed by the msid.
   *
   * Only rows that were processed while preparing the previously returned
   * source must be returned.
   *
   * @return
   *   An array of mail spool rows, keyed by the msid. Can optionally have set
   *   the following additional properties.
   *     - actual_nid: In case of content translation, the source node that was
   *       used for this mail.
   *     - error: FALSE if the prepration for this row failed. For example set
   *       when the corresponding node failed to load.
   *     - status: A simplenews spool status to indicate the status.
   */
  function getProcessed();

}

Members

Namesort descending Modifiers Type Description Overrides
SimplenewsSpoolInterface::getProcessed function Returns the processed mail spool rows, keyed by the msid. 1
SimplenewsSpoolInterface::nextSource function Returns a Simplenews source to be sent. 1
SimplenewsSpoolInterface::__construct function Initalizes the spool implementation. 1