adds comments for phpDoc

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10734 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-05-24 06:48:10 +00:00
parent a3193e105b
commit e3f346d44b

View file

@ -9,36 +9,128 @@ else
} }
/** /**
* @brief Mailing class for XpressEngine * Mailing class for XpressEngine
*
* @author NHN (developers@xpressengine.com) * @author NHN (developers@xpressengine.com)
* @developer NHN (developers@xpressengine.com)
*/ */
class Mail extends PHPMailer class Mail extends PHPMailer
{ {
/**
* Sender name
* @var string
*/
var $sender_name = ''; var $sender_name = '';
/**
* Sender email address
* @var string
*/
var $sender_email = ''; var $sender_email = '';
/**
* Receiptor name
* @var string
*/
var $receiptor_name = ''; var $receiptor_name = '';
/**
* Receiptor email address
* @var string
*/
var $receiptor_email = ''; var $receiptor_email = '';
/**
* Title of email
* @var string
*/
var $title = ''; var $title = '';
/**
* Content of email
* @var string
*/
var $content = ''; var $content = '';
/**
* Content type
* @var string
*/
var $content_type = 'html'; var $content_type = 'html';
/**
* Message id
* @var string
*/
var $messageId = NULL; var $messageId = NULL;
/**
* Reply to
* @var string
*/
var $replyTo = NULL; var $replyTo = NULL;
/**
* BCC (Blind carbon copy)
* @var string
*/
var $bcc = NULL; var $bcc = NULL;
/**
* Attachments
* @var array
*/
var $attachments = array(); var $attachments = array();
/**
* Content attachements
* @var array
*/
var $cidAttachments = array(); var $cidAttachments = array();
/**
* ???
* @var ???
*/
var $mainMailPart = NULL; var $mainMailPart = NULL;
/**
* Raw body
* @var string
*/
var $body = ''; var $body = '';
/**
* Raw header
* @var string
*/
var $header = ''; var $header = '';
/**
* End of line
* @var string
*/
var $eol = ''; var $eol = '';
/**
* Reference
* @var string
*/
var $references = ''; var $references = '';
/**
* Additional parameters
* @var string
*/
var $additional_params = NULL; var $additional_params = NULL;
/**
* Whether use or not use stmp
* @var bool
*/
var $use_smtp = FALSE; var $use_smtp = FALSE;
/** /**
* @brief Constructor function * Constructor function
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @return void * @return void
*/ */
@ -48,13 +140,10 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set parameters for using Gmail * Set parameters for using Gmail
* @access public
* @developer NHN (developers@xpressengine.com)
*
* @param $account_name password
* @param $account_passwd secure method ('ssl','tls')
* *
* @param string $account_name Password
* @param string $account_passwd Secure method ('ssl','tls')
* @return void * @return void
*/ */
function useGmailAccount($account_name, $account_passwd) function useGmailAccount($account_name, $account_passwd)
@ -76,18 +165,16 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set parameters for using SMTP protocol * Set parameters for using SMTP protocol
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $auth SMTP authentication * @param bool $auth SMTP authentication
* @param $host * @param string $host SMTP host address
* @param $user * @param string $user SMTP user id
* @param $password * @param string $pass STMP user password
* @param $secure method ('ssl','tls') * @param string $secure method ('ssl','tls')
* @param $port * @param int $port STMP port
* *
* @return boolean TRUE if SMTP is set correct, otherwise return FALSE * @return bool TRUE if SMTP is set correct, otherwise return FALSE
*/ */
function useSMTP($auth = NULL, $host = NULL, $user = NULL, $pass = NULL, $secure = NULL, $port = 25) function useSMTP($auth = NULL, $host = NULL, $user = NULL, $pass = NULL, $secure = NULL, $port = 25)
{ {
@ -116,11 +203,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set additional parameters * Set additional parameters
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $additional_params * @param string $additional_params Additional parameters
* @return void * @return void
*/ */
function setAdditionalParams($additional_params) function setAdditionalParams($additional_params)
@ -129,12 +214,10 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Add file attachment * Add file attachment
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $filename * @param string $filename File name to attach
* @param $orgfilename (real path to file) * @param string $orgfilename Real path of file to attach
* @return void * @return void
*/ */
function addAttachment($filename, $orgfilename) function addAttachment($filename, $orgfilename)
@ -143,12 +226,10 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Add content attachment * Add content attachment
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $filename * @param string $filename Real path of file to attach
* @param $cid * @param string $cid Content-CID
* @return void * @return void
*/ */
function addCidAttachment($filename, $cid) function addCidAttachment($filename, $cid)
@ -157,12 +238,10 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set Sender (From:) * Set Sender (From:)
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $name * @param string $name Sender name
* @param $email * @param string $email Sender email address
* @return void * @return void
*/ */
function setSender($name, $email) function setSender($name, $email)
@ -179,9 +258,7 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Get Sender (From:) * Get Sender (From:)
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @return string * @return string
*/ */
@ -195,12 +272,10 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set Receiptor (TO:) * Set Receiptor (TO:)
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $name * @param string $name Receiptor name
* @param $email * @param string $email Receiptor email address
* @return void * @return void
*/ */
function setReceiptor($name, $email) function setReceiptor($name, $email)
@ -217,9 +292,7 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Get Receiptor (TO:) * Get Receiptor (TO:)
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @return string * @return string
*/ */
@ -233,11 +306,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set Email's Title * Set Email's Title
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $title * @param string $title Title to set
* @return void * @return void
*/ */
function setTitle($title) function setTitle($title)
@ -253,9 +324,7 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Get Email's Title * Get Email's Title
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @return string * @return string
*/ */
@ -265,11 +334,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set BCC * Set BCC
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $bcc * @param string $bcc
* @return void * @return void
*/ */
function setBCC($bcc) function setBCC($bcc)
@ -285,11 +352,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set Message ID * Set Message ID
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $messageId * @param string $messageId
* @return void * @return void
*/ */
function setMessageID($messageId) function setMessageID($messageId)
@ -298,11 +363,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set references * Set references
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $references * @param string $references
* @return void * @return void
*/ */
function setReferences($references) function setReferences($references)
@ -311,11 +374,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set ReplyTo param * Set ReplyTo param
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $replyTo * @param string $replyTo
* @return void * @return void
*/ */
function setReplyTo($replyTo) function setReplyTo($replyTo)
@ -331,11 +392,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set message content * Set message content
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $content * @param string $content Content
* @return void * @return void
*/ */
function setContent($content) function setContent($content)
@ -352,12 +411,10 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Replace resourse path of the files * Replace resourse path of the files
* @access public
* @developer NHN (developers@xpressengine.com)
*
* @param $matches
* *
* @see Mail::setContent()
* @param array $matches Match info.
* @return string * @return string
*/ */
function replaceResourceRealPath($matches) function replaceResourceRealPath($matches)
@ -366,9 +423,7 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Get the Plain content of body message * Get the Plain content of body message
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @return string * @return string
*/ */
@ -378,9 +433,7 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Get the HTML content of body message * Get the HTML content of body message
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @return string * @return string
*/ */
@ -390,11 +443,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Set the type of body's content * Set the type of body's content
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @param $mode * @param string $mode
* @return void * @return void
*/ */
function setContentType($mode = 'html') function setContentType($mode = 'html')
@ -403,9 +454,7 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Process the images from attachments * Process the images from attachments
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @return void * @return void
*/ */
@ -460,9 +509,7 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Process the images from body content. This functions is used if Mailer is set as mail not as SMTP * Process the images from body content. This functions is used if Mailer is set as mail not as SMTP
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @return void * @return void
*/ */
@ -505,11 +552,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Send email * Send email
* @access public
* @developer NHN (developers@xpressengine.com)
* *
* @return boolean TRUE in case of success, FALSE if sending fails * @return bool TRUE in case of success, FALSE if sending fails
*/ */
function send() function send()
{ {
@ -567,12 +612,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Check if DNS of param is real or fake * Check if DNS of param is real or fake
* @access public
* @developer NHN (developers@xpressengine.com)
*
* @param $email_address
* *
* @param string $email_address Email address
* @return boolean TRUE if param is valid DNS otherwise FALSE * @return boolean TRUE if param is valid DNS otherwise FALSE
*/ */
function checkMailMX($email_address) function checkMailMX($email_address)
@ -597,12 +639,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Check if param is a valid email or not * Check if param is a valid email or not
* @access public
* @developer NHN (developers@xpressengine.com)
*
* @param $email_address
* *
* @param string $email_address Email address
* @return string email address if param is valid email address otherwise blank string * @return string email address if param is valid email address otherwise blank string
*/ */
function isVaildMailAddress($email_address) function isVaildMailAddress($email_address)
@ -618,12 +657,9 @@ class Mail extends PHPMailer
} }
/** /**
* @brief Gets the MIME type of param * Gets the MIME type of param
* @access public
* @developer NHN (developers@xpressengine.com)
*
* @param $filename filename
* *
* @param string $filename filename
* @return string MIME type of ext * @return string MIME type of ext
*/ */
function returnMIMEType($filename) function returnMIMEType($filename)