PHP Classes

MailMan Code Query

Recommend this page to a friend!

      Mail Man  >  All threads  >  MailMan Code Query  >  (Un) Subscribe thread alerts  
Subject:MailMan Code Query
Summary:Why Underscores?
Messages:3
Author:Graham Griffiths
Date:2005-04-14 13:35:12
Update:2005-07-21 19:29:43
 

  1. MailMan Code Query   Reply   Report abuse  
Picture of Graham Griffiths Graham Griffiths - 2005-04-14 13:35:12
I wonder if you could explain why you use underscores to prefix some variables and some functions.

I only noticed these underscores when I had to change the line,

mail($recipients,$this->subject,$message,$this->headers);

in class.MailManPlus_v1.1.php to,

mail($recipients,$this->subject,$message,$this->_headers);

to avoid getting an error.

Regards

  2. Re: MailMan Code Query   Reply   Report abuse  
Picture of juglesh juglesh - 2005-04-22 01:03:34 - In reply to message 1 from Graham Griffiths
yeah, is that wierd? I dont get errors though, seems to work fine.

  3. Re: MailMan Code Query [Bug?]   Reply   Report abuse  
Picture of Gamaiel Zavala Gamaiel Zavala - 2005-07-21 19:29:43 - In reply to message 1 from Graham Griffiths
I think the underscores are used for private functions/variables (should only be accessed by the class itself and not the user). I also had to make the change you mentioned. On lines 54 and 80 in class.MailManPlus $this->headers should be changed to $this->_headers.