Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updating to PHP 5 class syntax (public, etc…)

  • Loading branch information...
commit 2dae82795661ba5cb6a00a2b538e85f4ffa3d820 1 parent 22d0a3a
sophistry authored
View
2  README.md
@@ -1,5 +1,5 @@
Peeker - A framework for building automated email applications.
-=================
+================
Please read the documentation in the **docs** directory.
Peeker is a wrapper around the IMAP/POP3 extension available in PHP. It helps you avoid learning all the strange things about talking to an email server and concentrate on getting email as objects and properly-decoded attachments onto your filesystem.
View
2  demo_gmail_imap.php
@@ -1,5 +1,5 @@
<?php
-// change these lines
+// change these 3 lines
// the path to the peeker.php class file
include('path/to/peeker.php');
// this can also be a Google Apps email account
View
76 peeker.php
@@ -25,12 +25,12 @@ class peeker extends peeker_connect{
// set TRUE to automatically expunge
// deleted messages on close()
- var $expunge_on_close = FALSE;
+ public $expunge_on_close = FALSE;
- var $message_object_array = array();
- var $start_id = 0; // requested or derived start id
- var $end_id = 0; // requested or derived end id
- var $current_id = 0; // incremented in the acquire loop
+ public $message_object_array = array();
+ public $start_id = 0; // requested or derived start id
+ public $end_id = 0; // requested or derived end id
+ public $current_id = 0; // incremented in the acquire loop
// the message_class property
// allows the message class to be subclassed
@@ -43,16 +43,16 @@ class peeker extends peeker_connect{
// OR
// create a new class and use it for adding functions
// to be used by detectors and callbacks (see examples)
- var $message_class = 'peeker_parts';
+ public $message_class = 'peeker_parts';
// turn on and off detector circuits
// "global" switch for controlling all detectors
// default to off, create_detector() turns on
- var $detectors_on = FALSE;
- var $detector_set;
+ public $detectors_on = FALSE;
+ public $detector_set;
// layers empty array by default, so no errors
- var $layer_object_array = array();
+ public $layer_object_array = array();
// directory for all the attachments to get stored
// if they are saved to the filesystem
@@ -61,26 +61,26 @@ class peeker extends peeker_connect{
// "plugin" because you can use this class without
// ever handling an attachment or dealing with files
// but, it may be simpler to keep it this way
- var $attachment_dir = '';
+ public $attachment_dir = '';
// hold the valid encodings
// that mb functions can utilize
// in mime decoding technique
// these should be in utility, but keep them
// here for simplicity
- var $valid_mb_encoding_array;
+ public $valid_mb_encoding_array;
// handle search parameters and
// the returned id list array
- var $search;
- var $id_list_from_search;
- var $message_count_from_search = 0; // cf $message_count in parent class
+ public $search;
+ public $id_list_from_search;
+ public $message_count_from_search = 0; // cf $message_count in parent class
/**
* Constructor
*
*/
- function peeker($init_array = NULL)
+ public function peeker($init_array = NULL)
{
// build the valid encodings once for mime decoding
// could cache this even further up the chain
@@ -96,7 +96,7 @@ function peeker($init_array = NULL)
* everything using the detector method parts()
* in the peek_mail_parts class
*/
- function get_message($start, $end=NULL)
+ public function get_message($start, $end=NULL)
{
// set the message class to the parts class
// that just gets everything, this disturbs
@@ -121,7 +121,7 @@ function get_message($start, $end=NULL)
* Also calls any detectors set up for messages
* $start required, $end is not
*/
- function message($start, $end=NULL)
+ public function message($start, $end=NULL)
{
// protect the command from
// using empty string like NULL
@@ -229,7 +229,7 @@ function message($start, $end=NULL)
* and make sure they are not out of bounds
*
*/
- function _set_start_and_end_ids($start=NULL,$end=NULL)
+ private function _set_start_and_end_ids($start=NULL,$end=NULL)
{
$this->log_state("Requested _set_start_and_end_ids($start,$end)");
@@ -281,7 +281,7 @@ function _set_start_and_end_ids($start=NULL,$end=NULL)
*
*
*/
- function set_search($search='')
+ public function set_search($search='')
{
$this->search = $search;
$this->log_state('Setting search of (' . $this->mailbox . ') - to query: '.$this->search);
@@ -293,7 +293,7 @@ function set_search($search='')
* Calling this function updates msg_count var
* and if there is a message found
*/
- function search_and_count_messages($search='')
+ public function search_and_count_messages($search='')
{
$this->log_state('Searching current mailbox (' . $this->mailbox . ') - query: '.$this->search);
@@ -318,7 +318,7 @@ function search_and_count_messages($search='')
* from the search
*
*/
- function get_ids_from_search($index='')
+ public function get_ids_from_search($index='')
{
return ($index==='') ? $this->id_list_from_search : $this->id_list_from_search[$index];
}
@@ -334,7 +334,7 @@ function get_ids_from_search($index='')
* using the function decode_mime()
*
*/
- function _extract_headers_to_array($header)
+ private function _extract_headers_to_array($header)
{
$header_array = explode("\n", rtrim($header));
// drop off any empty, null or FALSE values
@@ -417,7 +417,7 @@ function _extract_headers_to_array($header)
* def_charset will be used to decode it.
* send it a MIME encoded header string
*/
- function decode_mime($mime_str_in, $in_charset='utf-8', $target_charset='utf-8', $def_charset='iso-8859-1')
+ public function decode_mime($mime_str_in, $in_charset='utf-8', $target_charset='utf-8', $def_charset='iso-8859-1')
{
// valid encodings in lowercase array
$in_charset = strtolower($in_charset);
@@ -457,7 +457,7 @@ function decode_mime($mime_str_in, $in_charset='utf-8', $target_charset='utf-8',
*
*
*/
- function set_message_class($class_name)
+ public function set_message_class($class_name)
{
$this->message_class = $class_name;
}
@@ -467,7 +467,7 @@ function set_message_class($class_name)
* acquired in messages()
*
*/
- function get_message_object($key='')
+ public function get_message_object($key='')
{
if ($key!=='')
{
@@ -485,7 +485,7 @@ function get_message_object($key='')
* the imap_clearflag_full() functions
* TODO: error checking on input
*/
- function flag_mail($id_or_range, $flag_string, $set_flag = TRUE)
+ public function flag_mail($id_or_range, $flag_string, $set_flag = TRUE)
{
if ( $set_flag )
{
@@ -505,7 +505,7 @@ function flag_mail($id_or_range, $flag_string, $set_flag = TRUE)
* wraps imap_mail_move() function
* This is only applicable to IMAP connections
*/
- function move_mail($id_or_range, $mailbox_name)
+ public function move_mail($id_or_range, $mailbox_name)
{
$bool = imap_mail_move($this->resource,$id_or_range,$mailbox_name);
$this->log_state('Moved message: ' . $id_or_range . ' to mailbox ' . $mailbox_name);
@@ -528,7 +528,7 @@ function move_mail($id_or_range, $mailbox_name)
* it only cares about its own settings with regard to how
* to handle message storage after a POP3 connection (see gmail settings tab)
*/
- function delete_and_expunge($start_id_or_range, $end_id = '')
+ public function delete_and_expunge($start_id_or_range, $end_id = '')
{
// make sure we've got a message there of that id
// and it's not a bogus id like 0 or -1
@@ -573,7 +573,7 @@ function delete_and_expunge($start_id_or_range, $end_id = '')
* for deletion, must call expunge to remove them
*
*/
- function delete($imap_range_string)
+ public function delete($imap_range_string)
{
if (is_resource($this->resource))
{
@@ -592,7 +592,7 @@ function delete($imap_range_string)
* marked for deletion
*
*/
- function expunge()
+ public function expunge()
{
if (is_resource($this->resource))
{
@@ -614,7 +614,7 @@ function expunge()
* Overrides the parent class close() method
* to implement expunge facility
*/
- function close($expunge_override=FALSE)
+ public function close($expunge_override=FALSE)
{
if (is_resource($this->resource))
{
@@ -651,7 +651,7 @@ function close($expunge_override=FALSE)
* returns empty array if no messages
* SLOW: about 5 messages per second
*/
- function fetch_overview($start=NULL, $end=NULL)
+ public function fetch_overview($start=NULL, $end=NULL)
{
// set start_id, end_id, and current_id
$this->_set_start_and_end_ids($start, $end);
@@ -674,7 +674,7 @@ function fetch_overview($start=NULL, $end=NULL)
* set error flag if not writeable
*
*/
- function set_attachment_dir($dir)
+ public function set_attachment_dir($dir)
{
// isdir() causes blank page error
//echo var_dump((isdir($dir)));
@@ -700,7 +700,7 @@ function set_attachment_dir($dir)
* return FALSE if not set yet
*
*/
- function get_attachment_dir()
+ public function get_attachment_dir()
{
// get default dir name
$class_var_defaults = get_class_vars(get_class($this));
@@ -723,7 +723,7 @@ function get_attachment_dir()
* on the email object and useable by detector circuits
* TODO: loop and load all the files requested
*/
- function layer($layer)
+ public function layer($layer)
{
// tell the object we are using layers
//$this->layers = TRUE;
@@ -744,7 +744,7 @@ function layer($layer)
* detectors
*
*/
- function make_detector_set()
+ public function make_detector_set()
{
include_once('peeker_detector_set.php');
// make a new one if we don't have it already
@@ -758,7 +758,7 @@ function make_detector_set()
* creates an interface to abort
* through the peek_mail parent class
*/
- function detectors_abort($state)
+ public function detectors_abort($state)
{
$this->detector_set->detectors_abort($state);
}
@@ -769,7 +769,7 @@ function detectors_abort($state)
* otherwise TRUE
*
*/
- function _check_msg_id($msg_id)
+ private function _check_msg_id($msg_id)
{
// make sure it is less than message count
// and greater than zero
View
6 peeker_autoresponder_methods.php
@@ -35,7 +35,7 @@ public function __toString()
* with other variations of bounced messages
*
*/
- function is_bounce()
+ public function is_bounce()
{
// Return-Path header has several issues
// 1) sometimes it is not included in the main properties of the header class
@@ -56,7 +56,7 @@ function is_bounce()
* return true if email has a from address
* and the address is not the no-return <>
*/
- function valid_from_email_for_response()
+ public function valid_from_email_for_response()
{
$from_address_valid = 0;
$return_path_address_valid = 0;
@@ -74,7 +74,7 @@ function valid_from_email_for_response()
// send an email response
// determine which email to use if it
// is not obvious
- function send_from($send_from_address='')
+ public function send_from($send_from_address='')
{
$to = $this->that->get_header_item('Return-Path');
p($to);
View
40 peeker_body.php
@@ -13,7 +13,7 @@
* has access to all the header data
* can manipulate messages on the mail server
* using the $this->peek_parent->resource property (resource)
-*
+*
*
*/
@@ -22,10 +22,10 @@
class peeker_body extends peeker_header{
// define the class that body will use for parts
- var $parts_class = 'peeker_parts';
+ public $parts_class = 'peeker_parts';
// the whole raw body string
- var $body_string;
+ public $body_string;
// store the plain and/or html body
// if not a multipart message
@@ -34,18 +34,18 @@ class peeker_body extends peeker_header{
// properties could have been filled by
// data from a multipart message
// should figure better way for this
- var $PLAIN='';
- var $HTML='';
+ public $PLAIN='';
+ public $HTML='';
// the UNIX timestamp when the message
// came into this class from mail server
- var $timestamp_pulled;
+ public $timestamp_pulled;
/**
* Constructor, connect to parent class
*
*/
- function peeker_body(&$peek_parent, $imap_h_obj)
+ public function peeker_body(&$peek_parent, $imap_h_obj)
{
// pass the resource on to the header class
parent::peeker_header($peek_parent, $imap_h_obj);
@@ -59,7 +59,7 @@ function peeker_body(&$peek_parent, $imap_h_obj)
* (if account is set to do archive or delete on POP access)
*
*/
- function get_body()
+ public function get_body()
{
// headers are retrieved first so body() is decoupled
// and messages() in peek class might have deleted this message
@@ -167,7 +167,7 @@ function get_body()
* get the body part (raw text undecoded)
*
*/
- function get_body_string()
+ public function get_body_string()
{
return $this->body_string;
}
@@ -176,7 +176,7 @@ function get_body_string()
* get the PLAIN part (text-only)
*
*/
- function get_plain()
+ public function get_plain()
{
return $this->PLAIN;
}
@@ -186,7 +186,7 @@ function get_plain()
* or if there is a rewritten part, send that
*
*/
- function get_html()
+ public function get_html()
{
return $this->HTML;
}
@@ -196,7 +196,7 @@ function get_html()
* or if there is a rewritten part, send that
*
*/
- function get_html_filtered()
+ public function get_html_filtered()
{
$html = (isset($this->HTML_rewritten))?$this->HTML_rewritten:$this->HTML;
return $html;
@@ -206,7 +206,7 @@ function get_html_filtered()
* get the date pulled timestamp
*
*/
- function get_timestamp_pulled()
+ public function get_timestamp_pulled()
{
return $this->timestamp_pulled;
}
@@ -217,7 +217,7 @@ function get_timestamp_pulled()
* to Y-m-d H:i:s mysql datetime string
*
*/
- function get_date_pulled()
+ public function get_date_pulled()
{
return date('Y-m-d H:i:s', $this->timestamp_pulled);
}
@@ -229,7 +229,7 @@ function get_date_pulled()
*
*
*/
- function preg_match_PLAIN($pattern)
+ public function preg_match_PLAIN($pattern)
{
return (bool)preg_match($pattern,$this->PLAIN);
}
@@ -239,7 +239,7 @@ function preg_match_PLAIN($pattern)
*
*
*/
- function preg_match_HTML($pattern)
+ public function preg_match_HTML($pattern)
{
return (bool)preg_match($pattern,$this->HTML);
}
@@ -249,7 +249,7 @@ function preg_match_HTML($pattern)
*
*
*/
- function has_PLAIN_not_HTML()
+ public function has_PLAIN_not_HTML()
{
return $this->PLAIN != '' && $this->HTML == '';
}
@@ -270,7 +270,7 @@ function has_PLAIN_not_HTML()
* need to look into fixing those too
*
*/
- function fix_MIME_from_sender($from_str)
+ public function fix_MIME_from_sender($from_str)
{
// use a detector that is in the parent class
if ($this->in_from($from_str))
@@ -299,7 +299,7 @@ function fix_MIME_from_sender($from_str)
* emails and also force all emails
* to be HTML
*/
- function put_PLAIN_into_HTML()
+ public function put_PLAIN_into_HTML()
{
// see loreal email for example
// this should be handled in a
@@ -320,7 +320,7 @@ function put_PLAIN_into_HTML()
* deal with tagged html
*
*/
- function wrap_HTML_with_HTML_tags()
+ public function wrap_HTML_with_HTML_tags()
{
$this->HTML = '<html><body>'.$this->HTML.'</body></html>';
}
View
10 peeker_ci_methods.php
@@ -9,7 +9,7 @@
class peeker_ci_methods
{
// hold the codeigniter object
- var $CI
+ public $CI
// create the link between this
// class and the base layer
@@ -41,7 +41,7 @@ public function __toString()
* this is usually called right after a check of approved senders
* this is in CI lib so we can talk to CI db stack
*/
- function unknown_sender_appeal($list_name)
+ public function unknown_sender_appeal($list_name)
{
// $list_name should not be the mailing address, but
@@ -99,7 +99,7 @@ function unknown_sender_appeal($list_name)
* remove any address that has a tag
*
*/
- function remove_registered_from_resend_to($tag='')
+ public function remove_registered_from_resend_to($tag='')
{
// because of the way the resend_to stripping works
// it was easier just to load up two independent detectors
@@ -121,7 +121,7 @@ function remove_registered_from_resend_to($tag='')
* this will overwrite any file
* returns TRUE if file was created
*/
- function save_HTML_as_view_file($view_file='HTML.html')
+ public function save_HTML_as_view_file($view_file='HTML.html')
{
// put the file into the views dir
// make sure the directory exists
@@ -157,7 +157,7 @@ function save_HTML_as_view_file($view_file='HTML.html')
* data into the view here
*
*/
- function load_email_as_view($view_file='HTML.html')
+ public function load_email_as_view($view_file='HTML.html')
{
// connect to the CI stack
$this->CI =& get_instance();
View
54 peeker_connect.php
@@ -3,23 +3,23 @@
class peeker_connect {
// POP3 OR IMAP
- var $server; // host and port combined into domain.com:port format
- var $host; // fully-qualified domain name
- var $port; // imap 143,993(secure) or pop3 110,995(secure) port
+ public $server; // host and port combined into domain.com:port format
+ public $host; // fully-qualified domain name
+ public $port; // imap 143,993(secure) or pop3 110,995(secure) port
- var $login;
- var $pass;
+ public $login;
+ public $pass;
- var $service_flags;
- var $mailbox;
- var $server_spec_string; // holds full connect spec, once it's all together
+ public $service_flags;
+ public $mailbox;
+ public $server_spec_string; // holds full connect spec, once it's all together
- var $resource;
- var $state_array = array();
+ public $resource;
+ public $state_array = array();
- var $connected = FALSE;
- var $message_count = NULL;
- var $mailboxes;
+ public $connected = FALSE;
+ public $message_count = NULL;
+ public $mailboxes;
// message_waiting is TRUE or FALSE
// because some POP servers return a
@@ -29,7 +29,7 @@ class peeker_connect {
// tell how many. so we just store the
// message_waiting boolean as the fastest
// way to know if there are any messages
- var $message_waiting = FALSE;
+ public $message_waiting = FALSE;
/**
* Constructor
@@ -37,7 +37,7 @@ class peeker_connect {
* user then has to call initialize() and pass the parameters
*
*/
- function peeker_connect($init_array = NULL)
+ public function peeker_connect($init_array = NULL)
{
if ( ! is_null($init_array) ) $this->initialize($init_array);
}
@@ -46,7 +46,7 @@ function peeker_connect($init_array = NULL)
* Set the server, login, pass, service_flags, and mailbox
*
*/
- function initialize($init_array)
+ public function initialize($init_array)
{
// connect to the specified account
// these array items need to be the
@@ -114,7 +114,7 @@ function initialize($init_array)
* Expects server, flags, and mailbox to be set already
*
*/
- function _generate_server_spec_string()
+ private function _generate_server_spec_string()
{
return '{'. $this->server . $this->service_flags.'}'.$this->mailbox;
}
@@ -136,7 +136,7 @@ function _generate_server_spec_string()
* presence of messages waiting
* (i.e., some don't so you have to count them)
*/
- function get_message_count($force_recount=FALSE)
+ public function get_message_count($force_recount=FALSE)
{
if (is_null($this->message_count) OR $force_recount)
{
@@ -158,7 +158,7 @@ function get_message_count($force_recount=FALSE)
* returns array of server specification
* strings for the mailboxes
*/
- function get_mailboxes()
+ public function get_mailboxes()
{
// star pattern says get all mailboxes
// imap_list() gets array of full mailbox names
@@ -174,7 +174,7 @@ function get_mailboxes()
* (like the one that is returned by imap_list())
*
*/
- function change_to_mailbox($mailbox_name_or_full_server_spec_string)
+ public function change_to_mailbox($mailbox_name_or_full_server_spec_string)
{
// should check if it is a valid mailbox
// but for now, just see if it starts with curly bracket
@@ -209,7 +209,7 @@ function change_to_mailbox($mailbox_name_or_full_server_spec_string)
* the underlying pop lib allows 3 login attempts, in PHP >= 5.2.0 it can be changed
* but, that will change some of the rejection handler code.
*/
- function _handle_rejection($err)
+ private function _handle_rejection($err)
{
$reject_reason = 'Unknown reason for rejection.';
if (isset($err[0]))
@@ -267,7 +267,7 @@ function _handle_rejection($err)
* Log the states the connection has gone through
*
*/
- function log_state($str)
+ public function log_state($str)
{
$this->state_array[] = $str;
}
@@ -277,7 +277,7 @@ function log_state($str)
* Get the array of states the connection has gone through
*
*/
- function trace()
+ public function trace()
{
return $this->state_array;
}
@@ -286,7 +286,7 @@ function trace()
* Get the login name
*
*/
- function get_login()
+ public function get_login()
{
return $this->login;
}
@@ -296,7 +296,7 @@ function get_login()
* See if the class connected to the server
*
*/
- function is_connected()
+ public function is_connected()
{
return $this->connected;
}
@@ -306,7 +306,7 @@ function is_connected()
* See if there are messages waiting
*
*/
- function message_waiting()
+ public function message_waiting()
{
return $this->message_waiting;
}
@@ -319,7 +319,7 @@ function message_waiting()
* there is no resource
*
*/
- function close()
+ public function close()
{
if (is_resource($this->resource))
{
View
8 peeker_db_methods.php
@@ -11,8 +11,8 @@
class peeker_db_methods
{
// hold the codeigniter object
- var $CI
- var $email_table = 'email';
+ public $CI
+ public $email_table = 'email';
// create the link between this->that
// class and the base layer
@@ -41,7 +41,7 @@ public function __toString()
* insert one message into one table
* table needs fields named header and body
*/
- function insert_one()
+ public function insert_one()
{
$header_string = $this->that->get_header_string();
$plain = $this->that->get_plain();
@@ -59,7 +59,7 @@ function insert_one()
* existing set up
*
*/
- function get_email_as_array()
+ public function get_email_as_array()
{
// we are going to return this->that
// array with all the email data
View
38 peeker_detector.php
@@ -22,24 +22,24 @@
class peeker_detector {
- var $detector_method;
+ public $detector_method;
// XOR this property with
// the check() method result
// to invert the result
- var $invert_detector = FALSE;
- var $detector_method_arguments;
- var $callback_method;
- var $callback_method_arguments;
+ public $invert_detector = FALSE;
+ public $detector_method_arguments;
+ public $callback_method;
+ public $callback_method_arguments;
- var $detector_set_parent;
+ public $detector_set_parent;
- var $active = TRUE;
+ public $active = TRUE;
/**
* Constructor
* wrapper to add everything at once
*/
- function peeker_detector($dm=NULL, $dma=NULL, $cm=NULL, $cma=NULL, &$detector_set_parent)
+ public function peeker_detector($dm=NULL, $dma=NULL, $cm=NULL, $cma=NULL, &$detector_set_parent)
{
//if($detector_set_parent !== NULL)
$this->detector_set_parent =& $detector_set_parent;
@@ -58,7 +58,7 @@ function peeker_detector($dm=NULL, $dma=NULL, $cm=NULL, $cma=NULL, &$detector_se
* set the detector method
*
*/
- function set_detector($method)
+ public function set_detector($method)
{
// magic string on detector
// method inverts the boolean
@@ -77,7 +77,7 @@ function set_detector($method)
* get the detector method
*
*/
- function get_detector()
+ public function get_detector()
{
return ($this->invert_detector) ? $this->detector_set_parent->invert_detector_method_string.$this->detector_method : $this->detector_method;
}
@@ -86,7 +86,7 @@ function get_detector()
* set the detector method arguments
*
*/
- function set_detector_arguments(&$array)
+ public function set_detector_arguments(&$array)
{
$this->detector_method_arguments = $array;
}
@@ -95,7 +95,7 @@ function set_detector_arguments(&$array)
* get the detector method arguments
*
*/
- function get_detector_arguments()
+ public function get_detector_arguments()
{
return $this->detector_method_arguments;
}
@@ -104,7 +104,7 @@ function get_detector_arguments()
* set the callback method
*
*/
- function set_callback($method)
+ public function set_callback($method)
{
$this->callback_method = $method;
}
@@ -113,7 +113,7 @@ function set_callback($method)
* get the callback method
*
*/
- function get_callback()
+ public function get_callback()
{
return $this->callback_method;
}
@@ -122,7 +122,7 @@ function get_callback()
* set the callback method arguments
*
*/
- function set_callback_arguments(&$array)
+ public function set_callback_arguments(&$array)
{
$this->callback_method_arguments = $array;
}
@@ -131,7 +131,7 @@ function set_callback_arguments(&$array)
* get the callback method arguments
*
*/
- function get_callback_arguments()
+ public function get_callback_arguments()
{
return $this->callback_method_arguments;
}
@@ -142,7 +142,7 @@ function get_callback_arguments()
* override to send detector call
* to an object
*/
- function check(&$obj)
+ public function check(&$obj)
{
if ( ! $this->active) return FALSE;
// this line can target any function
@@ -160,7 +160,7 @@ function check(&$obj)
* override to send callback
* to an object
*/
- function trigger(&$obj)
+ public function trigger(&$obj)
{
if ( ! $this->active) return FALSE;
// this line can target any function
@@ -173,7 +173,7 @@ function trigger(&$obj)
* turn it on or off
*
*/
- function set_active($bool)
+ public function set_active($bool)
{
$this->active = $bool;
}
View
38 peeker_detector_set.php
@@ -10,27 +10,27 @@
class peeker_detector_set {
// keep track of what happens
- var $log_array = array();
+ public $log_array = array();
// we can prepend this string
// to any function that returns
// boolean and it will invert result
- var $invert_detector_method_string = 'not__';
- var $invert_detector_method_string_length;
+ public $invert_detector_method_string = 'not__';
+ public $invert_detector_method_string_length;
// "inside the detector loop" switch for controlling detectors
// default to FALSE, abort_detectors() turns on
- var $detectors_abort = FALSE;
+ public $detectors_abort = FALSE;
// holds the detector objects
- var $detector_array = array();
+ public $detector_array = array();
// holds the booleans that map to detectors
- var $detector_trigger_array = array();
+ public $detector_trigger_array = array();
/**
* Constructor
* wrapper to add everything at once
*/
- function peeker_detector_set()
+ public function peeker_detector_set()
{
// strlen the inverter string once
@@ -46,7 +46,7 @@ function peeker_detector_set()
* Receive $em_message_object by reference
*
*/
- function run(&$em_message_obj)
+ public function run(&$em_message_obj)
{
// reset the abort state for detectors
// so that if we are in a multi-message
@@ -94,7 +94,7 @@ function run(&$em_message_obj)
* just run the triggers
* testing just triggers
*/
- function run_triggers(&$em_message_obj)
+ public function run_triggers(&$em_message_obj)
{
$this->detector_trigger_array = array();
foreach ($this->detector_array as $detector)
@@ -112,7 +112,7 @@ function run_triggers(&$em_message_obj)
* send TRUE to run all callbacks
* for testing or reporting
*/
- function run_callbacks(&$em_message_obj, $all=FALSE)
+ public function run_callbacks(&$em_message_obj, $all=FALSE)
{
if ($all===FALSE)
{
@@ -143,7 +143,7 @@ function run_callbacks(&$em_message_obj, $all=FALSE)
* message in message()
*
*/
- function _add_detector($detector_obj)
+ public function _add_detector($detector_obj)
{
$this->detector_array[] = $detector_obj;
//p($this->detector_array);
@@ -158,7 +158,7 @@ function _add_detector($detector_obj)
* also, turns on detector checking
*
*/
- function detector($dm, $dma, $cm, $cma)
+ public function detector($dm, $dma, $cm, $cma)
{
include_once('peeker_detector.php');
$detector = new peeker_detector($dm, $dma, $cm, $cma, $this);
@@ -177,7 +177,7 @@ function detector($dm, $dma, $cm, $cma)
* ttrue() method
*
*/
- function detect_phase($dm, $dma='')
+ public function detect_phase($dm, $dma='')
{
return $this->detector($dm, $dma, 'ttrue', '');
}
@@ -193,7 +193,7 @@ function detect_phase($dm, $dma='')
* ttrue() method
*
*/
- function callback_phase($cm, $cma='')
+ public function callback_phase($cm, $cma='')
{
return $this->detector('ttrue', '', $cm, $cma);
}
@@ -204,7 +204,7 @@ function callback_phase($cm, $cma='')
* but keep them around
*
*/
- function set_detectors_state($state)
+ public function set_detectors_state($state)
{
$this->detectors_on = $state;
}
@@ -213,7 +213,7 @@ function set_detectors_state($state)
* abort the detector loop (do not trigger or check)
* in messages() method
*/
- function detectors_abort($state)
+ public function detectors_abort($state)
{
$this->log_array[] = 'Setting detectors abort state: ' . var_export($state,TRUE);
$this->detectors_abort = $state;
@@ -222,7 +222,7 @@ function detectors_abort($state)
/**
* accessor method: get the state array
*/
- function get_log_array()
+ public function get_log_array()
{
return $this->log_array;
}
@@ -230,7 +230,7 @@ function get_log_array()
/**
* settor method: set the state array
*/
- function set_log_array($in)
+ public function set_log_array($in)
{
$this->log_array = $in;
}
@@ -244,7 +244,7 @@ function set_log_array($in)
* returns true - check right after in detector stack
*
*/
- function _get_previous_detector_state()
+ public function _get_previous_detector_state()
{
return end($this->detector_trigger_array);
}
View
40 peeker_file.php
@@ -11,21 +11,21 @@
class peeker_file{
- var $filename;
- var $string;
- var $encoding;
- var $part_no;
- var $cid;
- var $disposition;
- var $bytes;
- var $type;
- var $subtype;
+ public $filename;
+ public $string;
+ public $encoding;
+ public $part_no;
+ public $cid;
+ public $disposition;
+ public $bytes;
+ public $type;
+ public $subtype;
/**
* Constructor
*
*/
- function peeker_file($assoc_array)
+ public function peeker_file($assoc_array)
{
// set the properties based on the incoming array
foreach ($assoc_array as $key => $value)
@@ -38,7 +38,7 @@ function peeker_file($assoc_array)
* access the filename
*
*/
- function get_filename()
+ public function get_filename()
{
return $this->filename;
}
@@ -47,7 +47,7 @@ function get_filename()
* access the data string
*
*/
- function get_string()
+ public function get_string()
{
return $this->string;
}
@@ -56,7 +56,7 @@ function get_string()
* access
*
*/
- function get_encoding()
+ public function get_encoding()
{
return $this->encoding;
}
@@ -65,7 +65,7 @@ function get_encoding()
* access
*
*/
- function get_part_no()
+ public function get_part_no()
{
return $this->part_no;
}
@@ -74,7 +74,7 @@ function get_part_no()
* access
*
*/
- function get_cid()
+ public function get_cid()
{
return $this->cid;
}
@@ -83,7 +83,7 @@ function get_cid()
* access
*
*/
- function get_disposition()
+ public function get_disposition()
{
return $this->disposition;
}
@@ -92,7 +92,7 @@ function get_disposition()
* access
*
*/
- function get_bytes()
+ public function get_bytes()
{
return $this->bytes;
}
@@ -101,7 +101,7 @@ function get_bytes()
* access
*
*/
- function get_type()
+ public function get_type()
{
return $this->type;
}
@@ -113,7 +113,7 @@ function get_type()
* could standardize on input...
*
*/
- function get_subtype()
+ public function get_subtype()
{
$st = strtolower($this->subtype);
// reformat to standardize
@@ -133,7 +133,7 @@ function get_subtype()
* in HTML inline
*
*/
- function has_cid()
+ public function has_cid()
{
return (bool)$this->get_cid();
}
View
200 peeker_header.php
@@ -24,85 +24,85 @@
class peeker_header extends peeker_layers{
// the spawning parent
- var $peek_parent;
+ public $peek_parent;
// the resource - used to manipulate messages
// passed to constructor because the instance is spawned
// into a collection rather than inherited
- var $res;
+ public $res;
// the message id as it came in (not unique)
// treat as a temporary id
- var $Msgno;
+ public $Msgno;
// these are all properties of the email message
// that can be gleaned from the header data
// standardized date string RFC822
- var $date;
- var $subject; // decoded subject
- var $raw_subject; // undecoded subject
- var $message_id; // raw message_id header
+ public $date;
+ public $subject; // decoded subject
+ public $raw_subject; // undecoded subject
+ public $message_id; // raw message_id header
// address fields as strings - 1024 character limit
- var $toaddress;
- var $fromaddress;
- var $reply_toaddress;
- var $senderaddress;
- var $ccaddress;
- var $bccaddress;
- var $return_pathaddress;
+ public $toaddress;
+ public $fromaddress;
+ public $reply_toaddress;
+ public $senderaddress;
+ public $ccaddress;
+ public $bccaddress;
+ public $return_pathaddress;
- var $remail; // address for remailing - experimental
+ public $remail; // address for remailing - experimental
// address fields as arrays
- var $to;
- var $from;
- var $reply_to;
- var $sender;
- var $cc;
- var $bcc;
- var $return_path;
+ public $to;
+ public $from;
+ public $reply_to;
+ public $sender;
+ public $cc;
+ public $bcc;
+ public $return_path;
- var $Size; // in bytes
- var $udate; // unix timestamp
+ public $Size; // in bytes
+ public $udate; // unix timestamp
- var $in_reply_to; // a reference to another email message
- var $followup_to; // a reference to another email message
- var $references; // a reference to another email message
+ public $in_reply_to; // a reference to another email message
+ public $followup_to; // a reference to another email message
+ public $references; // a reference to another email message
// flags for IMAP - descriptions from http://php.net/imap_headerinfo
- var $Recent; // R if recent and seen, N if recent and not seen, ' ' if not recent.
- var $Unseen; // U if not seen AND not recent, ' ' if seen OR not seen and recent
- var $Flagged; // F if flagged, ' ' if not flagged
- var $Answered; // A if answered, ' ' if unanswered
- var $Deleted; // D if deleted, ' ' if not deleted
- var $Draft; // X if draft, ' ' if not draft
+ public $Recent; // R if recent and seen, N if recent and not seen, ' ' if not recent.
+ public $Unseen; // U if not seen AND not recent, ' ' if seen OR not seen and recent
+ public $Flagged; // F if flagged, ' ' if not flagged
+ public $Answered; // A if answered, ' ' if unanswered
+ public $Deleted; // D if deleted, ' ' if not deleted
+ public $Draft; // X if draft, ' ' if not draft
// the raw header string
- var $header_string;
+ public $header_string;
// header string converted to nested arrays
- var $header_array;
+ public $header_array;
// fingerprint data point sources
// use these email strings to generate
// a "good enough" fingerprint to id dupes
// also use this unique fingerprint to
// create a directory for saving attachments
- var $fingerprint_sources = array('fromaddress', 'toaddress', 'subject', 'date');
+ public $fingerprint_sources = array('fromaddress', 'toaddress', 'subject', 'date');
// md5 hash of sources data points
- var $fingerprint = '';
+ public $fingerprint = '';
// if marked for delete
// test this var before calling imap_ fns
- var $mark_delete = FALSE;
+ public $mark_delete = FALSE;
// store errors with names of imap functions for keys
- var $error_array;
+ public $error_array;
/**
* Constructor
*
*/
- function peeker_header(&$peek_parent, $imap_h_obj)
+ public function peeker_header(&$peek_parent, $imap_h_obj)
{
// host the connection to the IMAP server
// and allow these classes to target functions
@@ -134,7 +134,7 @@ function peeker_header(&$peek_parent, $imap_h_obj)
*
*/
- function _set_class_vars($obj)
+ public function _set_class_vars($obj)
{
$class = get_class($this);
$class_vars = get_class_vars($class);
@@ -164,7 +164,7 @@ function _set_class_vars($obj)
* applying any decoding
* could "salt" this...
*/
- function _generate_email_fingerprint()
+ public function _generate_email_fingerprint()
{
foreach ($this->fingerprint_sources as $prop)
{
@@ -179,7 +179,7 @@ function _generate_email_fingerprint()
* inside this object
*
*/
- function _check_imap_errors($func)
+ public function _check_imap_errors($func)
{
$err = imap_errors();
if ($err !== FALSE) $this->error_array[$func] = $err;
@@ -190,7 +190,7 @@ function _check_imap_errors($func)
* Get the fingerprint hash
*
*/
- function get_fingerprint()
+ public function get_fingerprint()
{
return $this->fingerprint;
}
@@ -199,7 +199,7 @@ function get_fingerprint()
* Get the RFC822 date
* just returns the raw date as sent with the message
*/
- function get_date()
+ public function get_date()
{
return $this->date;
}
@@ -209,7 +209,7 @@ function get_date()
* Get the subject
* Subject is sometimes encoded
*/
- function get_subject()
+ public function get_subject()
{
return $this->subject;
}
@@ -218,7 +218,7 @@ function get_subject()
* Get the temp message id assigned by the mail server
*
*/
- function get_msgno()
+ public function get_msgno()
{
return $this->Msgno;
}
@@ -227,7 +227,7 @@ function get_msgno()
* Get the message id
*
*/
- function get_message_id()
+ public function get_message_id()
{
return $this->message_id;
}
@@ -237,13 +237,13 @@ function get_message_id()
* which may contain multiple addresses in string
*
*/
- function get_to() {return $this->_get_address_string('to');}
- function get_from() {return $this->_get_address_string('from');}
- function get_reply_to() {return $this->_get_address_string('reply_to');}
- function get_sender() {return $this->_get_address_string('sender');}
- function get_cc() {return $this->_get_address_string('cc');}
- function get_bcc() {return $this->_get_address_string('bcc');}
- function get_return_path() {return $this->_get_address_string('return_path');}
+ public function get_to() {return $this->_get_address_string('to');}
+ public function get_from() {return $this->_get_address_string('from');}
+ public function get_reply_to() {return $this->_get_address_string('reply_to');}
+ public function get_sender() {return $this->_get_address_string('sender');}
+ public function get_cc() {return $this->_get_address_string('cc');}
+ public function get_bcc() {return $this->_get_address_string('bcc');}
+ public function get_return_path() {return $this->_get_address_string('return_path');}
/**
* Get the address
@@ -253,7 +253,7 @@ function get_return_path() {return $this->_get_address_string('return_path');}
* This is like the get_address_array() fn
* but, it returns the raw string (mime decoded)
*/
- function _get_address_string($in_type)
+ public function _get_address_string($in_type)
{
$type = strtolower($in_type).'address';
if (isset($this->$type))
@@ -274,13 +274,13 @@ function _get_address_string($in_type)
* which may contain multiple addresses as items
*
*/
- function get_to_array($format=NULL) {return $this->_get_address_array('to',$format);}
- function get_from_array($format=NULL) {return $this->_get_address_array('from',$format);}
- function get_reply_to_array($format=NULL) {return $this->_get_address_array('reply_to',$format);}
- function get_sender_array($format=NULL) {return $this->_get_address_array('sender',$format);}
- function get_cc_array($format=NULL) {return $this->_get_address_array('cc',$format);}
- function get_bcc_array($format=NULL) {return $this->_get_address_array('bcc',$format);}
- function get_return_path_array($format=NULL) {return $this->_get_address_array('return_path',$format);}
+ public function get_to_array($format=NULL) {return $this->_get_address_array('to',$format);}
+ public function get_from_array($format=NULL) {return $this->_get_address_array('from',$format);}
+ public function get_reply_to_array($format=NULL) {return $this->_get_address_array('reply_to',$format);}
+ public function get_sender_array($format=NULL) {return $this->_get_address_array('sender',$format);}
+ public function get_cc_array($format=NULL) {return $this->_get_address_array('cc',$format);}
+ public function get_bcc_array($format=NULL) {return $this->_get_address_array('bcc',$format);}
+ public function get_return_path_array($format=NULL) {return $this->_get_address_array('return_path',$format);}
/**
* Get the address array for the message id and type
@@ -289,7 +289,7 @@ function get_return_path_array($format=NULL) {return $this->_get_address_array('
* so we decode each part here
* returns FALSE if there is no address type
*/
- function _get_address_array($in_type, $format)
+ public function _get_address_array($in_type, $format)
{
$address_array = array();
$type = strtolower($in_type);
@@ -335,7 +335,7 @@ function _get_address_array($in_type, $format)
* Get the size of the message
* converted from Size
*/
- function get_size()
+ public function get_size()
{
return $this->Size;
}
@@ -345,7 +345,7 @@ function get_size()
* Get the unix timestamp on the message
* converted from udate field
*/
- function get_udate()
+ public function get_udate()
{
return $this->udate;
}
@@ -353,7 +353,7 @@ function get_udate()
/**
* alias to get_udate
*/
- function get_timestamp()
+ public function get_timestamp()
{
return $this->get_udate();
}
@@ -363,7 +363,7 @@ function get_timestamp()
* all kinds of good data in here
* that is not available in imap_fetchheader()
*/
- function get_header_string()
+ public function get_header_string()
{
return $this->header_string;
}
@@ -374,7 +374,7 @@ function get_header_string()
* all kinds of good data in here
* that is not available in imap_fetchheader()
*/
- function get_header_array()
+ public function get_header_array()
{
return $this->header_array;
}
@@ -388,7 +388,7 @@ function get_header_array()
* Note: sometimes header items will be arrays
* eg. Received header is usually an array
*/
- function get_header_item($header_key)
+ public function get_header_item($header_key)
{
$h = FALSE;
if (isset($this->header_array[$header_key]))
@@ -408,7 +408,7 @@ function get_header_item($header_key)
* for the function name that
* triggered the error
*/
- function get_error_array()
+ public function get_error_array()
{
return $this->error_array;
}
@@ -417,7 +417,7 @@ function get_error_array()
* Return mark_delete
*
*/
- function get_mark_delete()
+ public function get_mark_delete()
{
return $this->mark_delete;
}
@@ -426,7 +426,7 @@ function get_mark_delete()
* Mark this object as deleted
*
*/
- function set_mark_delete($delete)
+ public function set_mark_delete($delete)
{
$this->mark_delete = $delete;
return $this->mark_delete;
@@ -440,7 +440,7 @@ function set_mark_delete($delete)
* message to the peek_parent
*
*/
- function detectors_abort($state=TRUE)
+ public function detectors_abort($state=TRUE)
{
$this->peek_parent->detectors_abort($state);
}
@@ -449,7 +449,7 @@ function detectors_abort($state=TRUE)
* abort, do action array items if called for
* right now only delete is possible
*/
- function abort($action_array=FALSE)
+ public function abort($action_array=FALSE)
{
$del = FALSE;
if (isset($action_array['delete']) && $action_array['delete'] === TRUE)
@@ -467,7 +467,7 @@ function abort($action_array=FALSE)
*
*
*/
- function abort_if_previous($action_array=FALSE)
+ public function abort_if_previous($action_array=FALSE)
{
if ($this->peek_parent->_get_previous_detector_state())
{
@@ -482,7 +482,7 @@ function abort_if_previous($action_array=FALSE)
* return TRUE all the time
* for testing
*/
- function ttrue($arg)
+ public function ttrue($arg)
{
return TRUE;
}
@@ -491,7 +491,7 @@ function ttrue($arg)
* return FALSE all the time
* for testing
*/
- function ffalse($arg)
+ public function ffalse($arg)
{
return FALSE;
}
@@ -500,7 +500,7 @@ function ffalse($arg)
* return whatever was sent in
* for testing
*/
- function reflect($arg)
+ public function reflect($arg)
{
return $arg;
}
@@ -509,7 +509,7 @@ function reflect($arg)
* true if Msgno property is equal to arg
*
*/
- function is_msgno($msgno)
+ public function is_msgno($msgno)
{
return $this->Msgno == $msgno;
}
@@ -518,7 +518,7 @@ function is_msgno($msgno)
* true if regex $pattern matches the field
* return TRUE or FALSE, not int like preg_match
*/
- function preg_match_field($arr)
+ public function preg_match_field($arr)
{
list($field,$pattern) = $arr;
return (bool)preg_match($pattern, $this->$field);
@@ -530,7 +530,7 @@ function preg_match_field($arr)
* cf array_key_exists() if you need
* a key exists test without the NULL check
*/
- function isset_header_array_key($key)
+ public function isset_header_array_key($key)
{
return isset($this->header_array[$key]);
}
@@ -539,7 +539,7 @@ function isset_header_array_key($key)
* true if regex $pattern matches the header entry
* return TRUE or FALSE, not int like preg_match
*/
- function preg_match_header_array_key($array)
+ public function preg_match_header_array_key($array)
{
list($key, $pattern) = $array;
if ($this->isset_header_array_key($key))
@@ -557,7 +557,7 @@ function preg_match_header_array_key($array)
* true if header property is empty
*
*/
- function empty_property($property)
+ public function empty_property($property)
{
$e = empty($this->$property);
if ($e) $this->log_state('EMPTY '.$property .' in msg #'.$this->Msgno);
@@ -569,7 +569,7 @@ function empty_property($property)
* true if undecoded fromaddress has a given string in it
* Case-insensitive.
*/
- function in_from($from_str)
+ public function in_from($from_str)
{
return strpos(strtolower($this->fromaddress),strtolower($from_str))!==FALSE;
}
@@ -578,7 +578,7 @@ function in_from($from_str)
* true if undecoded toaddress has a given string in it
* Case-insensitive.
*/
- function in_to($to_str)
+ public function in_to($to_str)
{
return strpos(strtolower($this->toaddress),strtolower($to_str))!==FALSE;
}
@@ -595,7 +595,7 @@ function in_to($to_str)
* optional parameter lets detectors abort
* on this delete as well
*/
- function set_delete($abort=FALSE)
+ public function set_delete($abort=FALSE)
{
if($this->Msgno > 0)
{
@@ -616,7 +616,7 @@ function set_delete($abort=FALSE)
* allows removing messages from
* the delete state
*/
- function undelete()
+ public function undelete()
{
$this->set_mark_delete(FALSE);
imap_undelete($this->peek_parent->resource, $this->Msgno);
@@ -628,7 +628,7 @@ function undelete()
* flag seen, then move message to another mailbox
* helps us remember to flag, then move
*/
- function flag_seen()
+ public function flag_seen()
{
$this->flag_mail('\Seen');
}
@@ -637,7 +637,7 @@ function flag_seen()
* move a message to another mailbox
*
*/
- function move_mail($mailbox_name)
+ public function move_mail($mailbox_name)
{
$this->peek_parent->move_mail($this->Msgno, $mailbox_name);
$this->log_state('Moved message #'.$this->Msgno . ' to '. $mailbox_name);
@@ -648,7 +648,7 @@ function move_mail($mailbox_name)
* flag seen, then move message to another mailbox
* helps us remember to flag, then move
*/
- function flag_seen_move_mail($mailbox_name)
+ public function flag_seen_move_mail($mailbox_name)
{
$this->flag_seen();
$this->move_mail($mailbox_name);
@@ -663,7 +663,7 @@ function flag_seen_move_mail($mailbox_name)
* Default to TRUE flag_state, set FALSE
* to remove the flag
*/
- function flag_mail($flag_string,$flag_state=TRUE)
+ public function flag_mail($flag_string,$flag_state=TRUE)
{
$this->peek_parent->flag_mail($this->Msgno, $flag_string, $flag_state);
$this->log_state('Flagged message #'.$this->Msgno . ' as '. $flag_string . (string)$flag_state);
@@ -677,7 +677,7 @@ function flag_mail($flag_string,$flag_state=TRUE)
* removes peek_parent property
*
*/
- function _print($d=NULL)
+ public function _print($d=NULL)
{
if ($d===NULL) $d = $this;
// don't display the peek parent property
@@ -689,7 +689,7 @@ function _print($d=NULL)
* print the argument
*
*/
- function pr($data)
+ public function pr($data)
{
$this->_print('PRINT: '.$data.' in message #'.$this->Msgno);
}
@@ -699,7 +699,7 @@ function pr($data)
* assumes the property name
* has an accessor function
*/
- function print_field($fn, $use_html_entities=TRUE)
+ public function print_field($fn, $use_html_entities=TRUE)
{
$func = 'get_'.$fn;
$data = ($use_html_entities) ? htmlentities($this->$func()) : $this->$func();
@@ -711,7 +711,7 @@ function print_field($fn, $use_html_entities=TRUE)
* and optional nested sub-item
*
*/
- function print_array($arr)
+ public function print_array($arr)
{
list($fn,$sub_fn) = $arr;
$func = 'get_'.$fn;
@@ -731,7 +731,7 @@ function print_array($arr)
* already in the subject
*
*/
- function prepend_subject($prepend_string)
+ public function prepend_subject($prepend_string)
{
$subj = $this->get_subject();
if (strpos($subj,$prepend_string)===FALSE)
@@ -756,7 +756,7 @@ function prepend_subject($prepend_string)
* inside the detector loop
*
*/
- function message_count()
+ public function message_count()
{
return $this->peek_parent->get_message_count();
}
@@ -768,7 +768,7 @@ function message_count()
* loop
*
*/
- function log_state($str)
+ public function log_state($str)
{
$this->peek_parent->log_state($str);
}
@@ -780,7 +780,7 @@ function log_state($str)
* inside a message acquisition loop
*
*/
- function expunge()
+ public function expunge()
{
$this->peek_parent->expunge();
}
View
52 peeker_listserv_methods.php
@@ -9,16 +9,16 @@
*/
class peeker_listserv_methods
{
- var $list_address;
- var $resend_to_array = array(); // simple email address array
- var $resend_cc_array = array(); // for using in the headers to show who else was CC'd
- var $approved_array = array(); // these email addresses are approved
+ public $list_address;
+ public $resend_to_array = array(); // simple email address array
+ public $resend_cc_array = array(); // for using in the headers to show who else was CC'd
+ public $approved_array = array(); // these email addresses are approved
// default NULL is required here
// because the code stores this
// in case there are multiple calls
// to the approved_sender check
- var $approved_sender = NULL;
+ public $approved_sender = NULL;
// create the link between this
// class and the base layer
@@ -47,7 +47,7 @@ public function __toString()
* set the email address for this list resender
*
*/
- function set_list_address($add)
+ public function set_list_address($add)
{
$this->list_address = $add;
return TRUE;
@@ -57,7 +57,7 @@ function set_list_address($add)
* return the list address
*
*/
- function get_list_address()
+ public function get_list_address()
{
return $this->list_address;
}
@@ -66,7 +66,7 @@ function get_list_address()
* set the array
*
*/
- function set_resend_to($arr)
+ public function set_resend_to($arr)
{
$this->resend_to_array = $arr;
return TRUE;
@@ -77,7 +77,7 @@ function set_resend_to($arr)
* this class will resend to
*
*/
- function get_resend_to()
+ public function get_resend_to()
{
return $this->resend_to_array;
}
@@ -86,7 +86,7 @@ function get_resend_to()
* set the array
*
*/
- function set_resend_cc($arr)
+ public function set_resend_cc($arr)
{
$this->resend_cc_array = $arr;
return TRUE;
@@ -97,7 +97,7 @@ function set_resend_cc($arr)
* the one in the message object
*
*/
- function carryover_cc()
+ public function carryover_cc()
{
//p($this->cc);
$cc_array = $this->that->get_cc_array();
@@ -112,7 +112,7 @@ function carryover_cc()
* this class will resend to
*
*/
- function get_resend_cc()
+ public function get_resend_cc()
{
return $this->resend_cc_array;
}
@@ -121,7 +121,7 @@ function get_resend_cc()
* append an address to the resent_to_array
*
*/
- function append_to_resend_to($address)
+ public function append_to_resend_to($address)
{
$this->resend_to_array[] = $address;
}
@@ -131,7 +131,7 @@ function append_to_resend_to($address)
* remove an address from the resend_to_array
*
*/
- function remove_from_resend_to($address)
+ public function remove_from_resend_to($address)
{
$stripped_resend_to_array = array();
$rsta = $this->get_resend_to();
@@ -153,7 +153,7 @@ function remove_from_resend_to($address)
* set the array
*
*/
- function set_approved($arr)
+ public function set_approved($arr)
{
$this->approved_array = $arr;
return TRUE;
@@ -164,7 +164,7 @@ function set_approved($arr)
* this class will resend to
*
*/
- function get_approved()
+ public function get_approved()
{
return $this->approved_array;
}
@@ -173,7 +173,7 @@ function get_approved()
* append an address to the approved_array
*
*/
- function append_to_approved($address)
+ public function append_to_approved($address)
{
$this->approved_array[] = $address;
}
@@ -188,7 +188,7 @@ function append_to_approved($address)
* that avoids the in_array() check
* and the log_state() call
*/
- function approved_sender()
+ public function approved_sender()
{
//pe($this->that);
if (is_null($this->approved_sender))
@@ -209,7 +209,7 @@ function approved_sender()
}
- function not_approved_sender_and_is_bounce_message()
+ public function not_approved_sender_and_is_bounce_message()
{
return (! $this->approved_sender() && $this->is_bounce_message());
}
@@ -223,7 +223,7 @@ function not_approved_sender_and_is_bounce_message()
* bounce detector
*
*/