Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF][PHP8.2] Avoid dynamic properties in mailstores #25243

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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