当前位置: 首页>>代码示例>>PHP>>正文


PHP CLog::CreateInstance方法代码示例

本文整理汇总了PHP中CLog::CreateInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP CLog::CreateInstance方法的具体用法?PHP CLog::CreateInstance怎么用?PHP CLog::CreateInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CLog的用法示例。


在下文中一共展示了CLog::CreateInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SendMail

    /**
     * @param Settings $settings
     * @param Account $account
     * @param WebMailMessage $message
     * @param string $from
     * @param string $to
     * @return bool
     */
    function SendMail(&$settings, &$account, &$message, $from, $to)
    {
        if ($account->IsDemo) {
            $allRcpt = $message->GetAllRecipients();
            for ($i = 0, $c = $allRcpt->Count(); $i < $c; $i++) {
                $rcpt =& $allRcpt->Get($i);
                if (strtolower($rcpt->GetDomain()) != 'afterlogic.com') {
                    setGlobalError('For security reasons, sending e-mail from this account 
to external addresses is disabled. Please send to livedemo@afterlogic.com or  
relogin in Advanced Login mode using your mail account on another mail server.');
                    return false;
                }
            }
        }
        $log =& CLog::CreateInstance();
        if ($from === null) {
            $fromAddr = $message->GetFrom();
            $from = $fromAddr->Email;
        }
        if ($to === null) {
            $to = $message->GetAllRecipientsEmailsAsString();
        }
        $link = null;
        $result = CSmtp::Connect($link, $account, $log);
        if ($result) {
            $result = CSmtp::Send($link, $account, $message, $from, $to, $log);
            if ($result) {
                $result = CSmtp::Disconnect($link, $log);
            }
        } else {
            setGlobalError(ErrorSMTPConnect);
        }
        return $result;
    }
开发者ID:JDevelopers,项目名称:Mail,代码行数:42,代码来源:class_smtp.php

示例2: __construct

 /**
  * @param Account $oAccount
  * @return CSieveStorage
  */
 public function __construct(Account $oAccount)
 {
     $this->_oLog =& CLog::CreateInstance();
     $this->_sLogin = $oAccount->MailIncLogin;
     $this->_sPassword = $oAccount->MailIncPassword;
     $this->_oSieve = null;
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:11,代码来源:class_sieve.php

示例3: DbOdbc

 /**
  * @param string $customConnectionString
  * @return DbOdbc
  */
 function DbOdbc($customConnectionString, $dbType, $user = '', $pass = '')
 {
     $this->_dbCustomConnectionString = $customConnectionString;
     $this->_dbType = $dbType;
     $this->_user = $user;
     $this->_pass = $pass;
     $this->_log =& CLog::CreateInstance();
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:12,代码来源:odbc.php

示例4: DbMySql

 /**
  * @param string $host
  * @param string $user
  * @param string $password
  * @param string $dbName
  * @return DbMySql
  */
 function DbMySql($host, $user, $password, $dbName)
 {
     $this->_host = $host;
     $this->_user = $user;
     $this->_password = $password;
     $this->_dbName = $dbName;
     $this->_log =& CLog::CreateInstance();
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:15,代码来源:mysql.php

示例5: WMserverStorage

 /**
  * @access public
  * @param Account $account
  * @return XmailStorage
  */
 function WMserverStorage(&$account)
 {
     MailServerStorage::MailServerStorage($account);
     $email = $account->Email;
     $basePath = $this->_settings->WmServerRootPath;
     $this->_wmserver = new WMserverFS($basePath, $email);
     $this->_wmadmin = new CWmServerConsole();
     $this->_log =& CLog::CreateInstance();
 }
开发者ID:diedsmiling,项目名称:busenika,代码行数:14,代码来源:class_wmserverstorage.php

示例6: WMserverFS

 /**
  * @access public
  * @param string $basePath
  * @param string $email
  * @return WMserverFS
  */
 function WMserverFS($basePath, $email)
 {
     $parsedEmail = ConvertUtils::ParseEmail($email);
     $this->userName = trim($parsedEmail[0]);
     $this->domain = trim($parsedEmail[1]);
     $this->basePath = rtrim($basePath, '/\\');
     $this->path = $this->basePath . '/domains/' . $this->domain . '/' . $this->userName . '/Maildir/';
     $this->_log =& CLog::CreateInstance();
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:15,代码来源:class_wmserver_fs.php

示例7: __construct

 public function __construct()
 {
     $this->account = null;
     $this->userId = null;
     $this->responseStatus = X_WMP_RESPONSE_STATUS_OK;
     $this->response = '';
     $this->log = null;
     $this->log =& CLog::CreateInstance();
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:9,代码来源:class_sync_base.php

示例8: execute

 function execute($query)
 {
     $log =& CLog::CreateInstance();
     $log->WriteLine('calendar MYSQL: ' . $query);
     $res = mysql_query($query);
     if ($res === false) {
         die(mysql_error());
     }
     return $res;
 }
开发者ID:diedsmiling,项目名称:busenika,代码行数:10,代码来源:db_mysql.php

示例9: execute

 function execute($query)
 {
     $log =& CLog::CreateInstance();
     $log->WriteLine('calendar MSSQL: ' . $query);
     $res = mssql_query($query);
     if ($res === false) {
         die(mssql_get_last_message());
     }
     return $res;
 }
开发者ID:diedsmiling,项目名称:busenika,代码行数:10,代码来源:db_mssql.php

示例10: MailStorage

 /**
  * @param Account $account
  * @return MailStorage
  */
 function MailStorage(&$account, $settings = null)
 {
     if (null === $settings) {
         $this->_settings =& Settings::CreateInstance();
     } else {
         $this->_settings =& $settings;
     }
     $this->_log =& CLog::CreateInstance($this->_settings);
     $this->Account =& $account;
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:14,代码来源:class_mailstorage.php

示例11: CWmServerConsole

 /**
  * @access public
  * @param string $host[optional] = null
  * @return CWmServerConsole
  */
 function CWmServerConsole($host = null)
 {
     $this->Settings =& WMSettings::CreateInstance();
     $this->_admHost = $host !== null ? $host : $this->Settings->Settings->WmServerHost;
     $this->_admPort = $this->Settings->AdminPort;
     $this->_admLogin = $this->Settings->AdminLogin;
     $this->_admPassword = $this->Settings->AdminPassword;
     $this->_log =& CLog::CreateInstance();
     if (!$this->Settings->IsLoad) {
         $this->_setError(str_replace('\\', '/', getGlobalError()));
     }
 }
开发者ID:diedsmiling,项目名称:busenika,代码行数:17,代码来源:class_wmserver.php

示例12: IMAPMAIL

 function IMAPMAIL()
 {
     $this->host = null;
     $this->port = 143;
     $this->user = '';
     $this->password = '';
     $this->state = 'DISCONNECTED';
     $this->connection = null;
     $this->error = '';
     $this->must_update = false;
     $this->tag = uniqid('HKC');
     $this->_log =& CLog::CreateInstance();
 }
开发者ID:diedsmiling,项目名称:busenika,代码行数:13,代码来源:class_imap.php

示例13: _importIcal

 private function _importIcal()
 {
     $icsText = implode('', file('php://input'));
     if (class_exists('CLog')) {
         $log =& CLog::CreateInstance();
         $log->WriteLine('Sync: Import Calendar[Body] / LENGTH = ' . strlen($icsText));
         $log->WriteLine('Sync: Import Calendar[Body] / RAW = ' . "\r\n" . $icsText);
     }
     $tmpfname = tempnam('/tmp', '');
     file_put_contents($tmpfname, $icsText);
     $result = $this->manager->ImportIcs($tmpfname);
     unlink($tmpfname);
     $this->responseStatus = $result ? X_WMP_RESPONSE_STATUS_OK : X_WMP_RESPONSE_STATUS_ERROR_DB_FAULT;
     $this->response = $result;
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:15,代码来源:class_sync_calendar.php

示例14: ExecCmd

 private static function ExecCmd($file, $cmd, $functionName)
 {
     $log =& CLog::CreateInstance();
     $log->WriteLine('Exim: ' . $functionName . ' / exec(\'' . $file . ' ' . $cmd . '\');');
     if (@file_exists($file)) {
         $output = array();
         @exec($file . ' ' . $cmd, $output);
         if (is_array($output) && count($output) > 0) {
             $log->WriteLine('Exim: ' . $functionName . ' / $output = ' . print_r($output, true));
         }
     } else {
         $log->WriteLine('Exim [error]: ' . $file . ' not exist!');
         return false;
     }
     return true;
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:16,代码来源:class_exim.php

示例15: IMAPMAIL

 function IMAPMAIL()
 {
     $this->host = null;
     $this->port = 143;
     $this->user = '';
     $this->password = '';
     $this->state = 'DISCONNECTED';
     $this->lastSelect = '';
     $this->proxyuser = null;
     $this->error = '';
     $this->must_update = false;
     $this->UpdateTag();
     $this->_oLog =& CLog::CreateInstance();
     if ($this->_oLog && $this->_oLog->Enabled) {
         $this->_bLogEnable = true;
     }
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:17,代码来源:class_imap.php


注:本文中的CLog::CreateInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。