本文整理汇总了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;
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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()));
}
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
}