Skip to content

Commit

Permalink
Merge pull request #25243 from braders/php82_mailbox_dynamic_properties
Browse files Browse the repository at this point in the history
[REF][PHP8.2] Avoid dynamic properties in mailstores
  • Loading branch information
eileenmcnaughton authored Dec 30, 2022
2 parents 7bd5c7c + d219213 commit 77b8cc9
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 3 deletions.
10 changes: 9 additions & 1 deletion CRM/Mailing/MailStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@
*/
class CRM_Mailing_MailStore {
/**
* flag to decide whether to print debug messages
* Flag to decide whether to print debug messages
*
* @var bool
*/
public $_debug = FALSE;

/**
* Holds the underlying mailbox transport implementation
*
* @var ezcMailImapTransport|ezcMailMboxTransport|ezcMailPop3Transport|null
*/
protected $_transport;

/**
* Return the proper mail store implementation, based on config settings.
*
Expand Down
14 changes: 14 additions & 0 deletions CRM/Mailing/MailStore/Imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
*/
class CRM_Mailing_MailStore_Imap extends CRM_Mailing_MailStore {

/**
* Path to a IMAP directory to store ignored emails
*
* @var string
*/
private $_ignored;

/**
* Path to a IMAP directory to store ignored emails
*
* @var string
*/
private $_processed;

/**
* Connect to the supplied IMAP server and make sure the two mailboxes exist.
*
Expand Down
23 changes: 22 additions & 1 deletion CRM/Mailing/MailStore/Localdir.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,32 @@
*/
class CRM_Mailing_MailStore_Localdir extends CRM_Mailing_MailStore {

/**
* Directory to operate upon.
*
* @var string
*/
private $_dir;

/**
* Path to a local directory to store ignored emails
*
* @var string
*/
private $_ignored;

/**
* Path to a local directory to store ignored emails
*
* @var string
*/
private $_processed;

/**
* Connect to the supplied dir and make sure the two mail dirs exist.
*
* @param string $dir
* Dir to operate upon.
* Directory to operate upon.
*
* @return \CRM_Mailing_MailStore_Localdir
*/
Expand Down
23 changes: 22 additions & 1 deletion CRM/Mailing/MailStore/Maildir.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,32 @@
*/
class CRM_Mailing_MailStore_Maildir extends CRM_Mailing_MailStore {

/**
* Directory to operate upon.
*
* @var string
*/
private $_dir;

/**
* Path to a local directory to store ignored emails
*
* @var string
*/
private $_ignored;

/**
* Path to a local directory to store ignored emails
*
* @var string
*/
private $_processed;

/**
* Connect to the supplied dir and make sure the two mail dirs exist.
*
* @param string $dir
* Dir to operate upon.
* Directory to operate upon.
*
* @return \CRM_Mailing_MailStore_Maildir
*/
Expand Down
21 changes: 21 additions & 0 deletions CRM/Mailing/MailStore/Mbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,27 @@
*/
class CRM_Mailing_MailStore_Mbox extends CRM_Mailing_MailStore {

/**
* Path to a local directory to store ignored emails
*
* @var string
*/
private $_ignored;

/**
* Path to a local directory to store ignored emails
*
* @var string
*/
private $_processed;

/**
* Count of messages left to process
*
* @var int
*/
private $_leftToProcess;

/**
* Connect to and lock the supplied file and make sure the two mail dirs exist.
*
Expand Down
14 changes: 14 additions & 0 deletions CRM/Mailing/MailStore/Pop3.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@
*/
class CRM_Mailing_MailStore_Pop3 extends CRM_Mailing_MailStore {

/**
* Path to a local directory to store ignored emails
*
* @var string
*/
private $_ignored;

/**
* Path to a local directory to store ignored emails
*
* @var string
*/
private $_processed;

/**
* Connect to the supplied POP3 server and make sure the two mail dirs exist
*
Expand Down

0 comments on commit 77b8cc9

Please sign in to comment.