Ignore:
Timestamp:
2013/02/18 19:09:54 (11 years ago)
Author:
shutta
Message:

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.12.4)
Zend Framework PHP 標準コーディング規約のコーディングスタイルへ準拠。
classおよびfunctionの開始波括弧「{」のスタイルを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/SC_SendMail.php

    r22206 r22567  
    2323 
    2424// テキスト/HTML メール送信 
    25 class SC_SendMail { 
     25class SC_SendMail  
     26{ 
    2627 
    2728    var $to;            // 送信先 
     
    3940     * @return void 
    4041     */ 
    41     function __construct() { 
     42    function __construct() 
     43    { 
    4244        $this->arrRecip = array(); 
    4345        $this->to = ''; 
     
    6264 
    6365    // 送信先の設定 
    64     function setRecip($key, $recipient) { 
     66    function setRecip($key, $recipient) 
     67    { 
    6568        $this->arrRecip[$key] = $recipient; 
    6669    } 
    6770 
    6871    // 宛先の設定 
    69     function setTo($to, $to_name = '') { 
     72    function setTo($to, $to_name = '') 
     73    { 
    7074        if ($to != '') { 
    7175            $this->to = $this->getNameAddress($to_name, $to); 
     
    7579 
    7680    // 送信元の設定 
    77     function setFrom($from, $from_name = '') { 
     81    function setFrom($from, $from_name = '') 
     82    { 
    7883        $this->from = $this->getNameAddress($from_name, $from); 
    7984    } 
    8085 
    8186    // CCの設定 
    82     function setCc($cc, $cc_name = '') { 
     87    function setCc($cc, $cc_name = '') 
     88    { 
    8389        if ($cc != '') { 
    8490            $this->cc = $this->getNameAddress($cc_name, $cc); 
     
    8894 
    8995    // BCCの設定 
    90     function setBCc($bcc) { 
     96    function setBCc($bcc) 
     97    { 
    9198        if ($bcc != '') { 
    9299            $this->bcc = $bcc; 
     
    96103 
    97104    // Reply-Toの設定 
    98     function setReplyTo($reply_to) { 
     105    function setReplyTo($reply_to) 
     106    { 
    99107        if ($reply_to != '') { 
    100108            $this->reply_to = $reply_to; 
     
    103111 
    104112    // Return-Pathの設定 
    105     function setReturnPath($return_path) { 
     113    function setReturnPath($return_path) 
     114    { 
    106115        $this->return_path = $return_path; 
    107116    } 
    108117 
    109118    // 件名の設定 
    110     function setSubject($subject) { 
     119    function setSubject($subject) 
     120    { 
    111121        $this->subject = mb_encode_mimeheader($subject, 'JIS', 'B', "\n"); 
    112122        $this->subject = str_replace(array("\r\n", "\r"), "\n", $this->subject); 
     
    114124 
    115125    // 本文の設定 
    116     function setBody($body) { 
     126    function setBody($body) 
     127    { 
    117128        // iso-2022-jpだと特殊文字が?で送信されるのでJISを使用する 
    118129        $this->body = mb_convert_encoding($body, 'JIS', CHAR_CODE); 
     
    124135     * @deprecated 2.12.2 (#1912) 
    125136     */ 
    126     function setHost($host) { 
     137    function setHost($host) 
     138    { 
    127139        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING); 
    128140        $this->host = $host; 
     
    141153     * @deprecated 2.12.2 (#1912) 
    142154     */ 
    143     function setPort($port) { 
     155    function setPort($port) 
     156    { 
    144157        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING); 
    145158        $this->port = $port; 
     
    153166 
    154167    // 名前<メールアドレス>の形式を生成 
    155     function getNameAddress($name, $mail_address) { 
     168    function getNameAddress($name, $mail_address) 
     169    { 
    156170            if ($name != '') { 
    157171                // 制御文字を変換する。 
     
    166180    } 
    167181 
    168     function setItem($to, $subject, $body, $fromaddress, $from_name, $reply_to='', $return_path='', $errors_to='', $bcc='', $cc ='') { 
     182    function setItem($to, $subject, $body, $fromaddress, $from_name, $reply_to='', $return_path='', $errors_to='', $bcc='', $cc ='') 
     183    { 
    169184        $this->setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to, $bcc, $cc); 
    170185    } 
    171186 
    172     function setItemHtml($to, $subject, $body, $fromaddress, $from_name, $reply_to='', $return_path='', $errors_to='', $bcc='', $cc ='') { 
     187    function setItemHtml($to, $subject, $body, $fromaddress, $from_name, $reply_to='', $return_path='', $errors_to='', $bcc='', $cc ='') 
     188    { 
    173189        $this->setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to, $return_path, $errors_to, $bcc, $cc); 
    174190    } 
     
    186202         $bcc           -> ブラインドカーボンコピー 
    187203    */ 
    188     function setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to='', $return_path='', $errors_to='', $bcc='', $cc ='') { 
     204    function setBase($to, $subject, $body, $fromaddress, $from_name, $reply_to='', $return_path='', $errors_to='', $bcc='', $cc ='') 
     205    { 
    189206        // 宛先設定 
    190207        $this->setTo($to); 
     
    213230 
    214231    // ヘッダーを返す 
    215     function getBaseHeader() { 
     232    function getBaseHeader() 
     233    { 
    216234        // 送信するメールの内容と送信先 
    217235        $arrHeader = array(); 
     
    236254 
    237255    // ヘッダーを返す 
    238     function getTEXTHeader() { 
     256    function getTEXTHeader() 
     257    { 
    239258        $arrHeader = $this->getBaseHeader(); 
    240259        $arrHeader['Content-Type'] = 'text/plain; charset="ISO-2022-JP"'; 
     
    243262 
    244263    // ヘッダーを返す 
    245     function getHTMLHeader() { 
     264    function getHTMLHeader() 
     265    { 
    246266        $arrHeader = $this->getBaseHeader(); 
    247267        $arrHeader['Content-Type'] = 'text/html; charset="ISO-2022-JP"'; 
     
    254274     * @return array|string メーラーバックエンドに応じた送信先 
    255275     */ 
    256     function getRecip() { 
     276    function getRecip() 
     277    { 
    257278        switch ($this->backend) { 
    258279            // PEAR::Mail_mail#send は、(他のメーラーバックエンドと異なり) 第1引数を To: として扱う。Cc: や Bcc: は、ヘッダー情報から処理する。 
     
    274295     * @return void 
    275296     */ 
    276     function sendMail($isHtml = false) { 
     297    function sendMail($isHtml = false) 
     298    { 
    277299        $header = $isHtml ? $this->getHTMLHeader() : $this->getTEXTHeader(); 
    278300        $recip = $this->getRecip(); 
     
    295317     * @return void 
    296318     */ 
    297     function sendHtmlMail() { 
     319    function sendHtmlMail() 
     320    { 
    298321        return $this->sendMail(true); 
    299322    } 
     
    305328     * @return array メーラーバックエンドに応じたパラメーターの配列 
    306329     */ 
    307     function getBackendParams($backend) { 
     330    function getBackendParams($backend) 
     331    { 
    308332        switch ($backend) { 
    309333            case 'mail': 
Note: See TracChangeset for help on using the changeset viewer.