• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CLog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 public function __construct($class, $msg = NULL)
 {
     if ($msg != NULL) {
         $this->message = $msg . " в файле " . $this->file . " в строке #" . $this->line;
     }
     if (CApp::settings("APPLICATION")->settings['logs_on']) {
         $log = new CLog();
         $log->logging($class, $this->message);
     }
 }
开发者ID:ennjamusic,项目名称:study,代码行数:10,代码来源:CException.php


示例2: __construct

 public function __construct($class, $msg = NULL)
 {
     if ($msg != NULL) {
         $this->message = $msg . " в файле " . $this->file;
     }
     if (LOGS_ON) {
         $log = new CLog();
         $log->logging($class, $this->message);
     }
 }
开发者ID:ennjamusic,项目名称:study,代码行数:10,代码来源:CException.php


示例3: smarty_modifier_domain

/**
 *
 *
 * @file modifier.domain.php
 * @package plugins
 * @author [email protected]
 * @date 2011-11-03 10:47
 */
function smarty_modifier_domain($string, $encodeURI = false)
{
    $logArr['smarty_modifier'] = "modifier_domain";
    $status = 0;
    $logArr['url'] = $string;
    $domain = $string;
    if (strncasecmp($domain, "http://", 7) == 0) {
        $domain = substr($domain, 7);
    } elseif (strncasecmp($domain, "url:", 4) == 0) {
        $pos = strspn($domain, " ", 4);
        $domain = substr($domain, 4 + $pos);
        if (strncasecmp($domain, "http://", 7) == 0) {
            $domain = substr($domain, 7);
        }
    }
    if (strlen($domain) == 0) {
        $domain = $string;
    }
    if ($encodeURI) {
        $result = hilight_encodeURI($domain);
        $logArr['result'] = $result;
        if (false === $result) {
            $status = -1;
            CLog::warning("fail to call hilight_domain", $status, $logArr, 1);
            return $domain;
        }
    } else {
        $result = $domain;
    }
    return $result;
}
开发者ID:drehere,项目名称:shenmegui,代码行数:39,代码来源:modifier.domain.php


示例4: __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


示例5: smarty_modifier_url_bold_html

/**
 *
 *
 * @file modifier.url_bold_html.php
 * @package plugins
 * @author [email protected]
 * @date 2011-11-03 10:40
 */
function smarty_modifier_url_bold_html($string)
{
    $logArr['smarty_modifier'] = "modifier_url_bold_html";
    $status = 0;
    $logArr['string'] = $string;
    if (strlen($string) == 0) {
        $result = $string;
        return $result;
    }
    $prefix = $GLOBALS['DISPLAY']['BOLD_PREFIX'];
    $suffix = $GLOBALS['DISPLAY']['BOLD_SUFFIX'];
    $logArr['prefix'] = $prefix;
    $logArr['suffix'] = $suffix;
    $result = hilight_url_bold_html($string, $prefix, $suffix);
    if (false === $result) {
        $result = $string;
        $status = -1;
        $logArr['result'] = $result;
        CLog::warning("fail to call hilight_url_bold_html", $status, $logArr, 1);
        return $result;
    }
    $logArr['result'] = $result;
    CLog::debug("success to call url_bold_html modifier", $status, $logArr, 1);
    return $result;
}
开发者ID:drehere,项目名称:shenmegui,代码行数:33,代码来源:modifier.url_bold_html.php


示例6: smarty_modifier_url_limit

/**
 *
 *
 * @file modifier.url_limit.php
 * @package plugins
 * @author [email protected]
 * @date 2011-11-03 10:40
 */
function smarty_modifier_url_limit($string, $length, $escaped = false)
{
    $logArr['smarty_modifier'] = "modifier_url_limit";
    $status = 0;
    $logArr['url'] = $string;
    $logArr['limit_len'] = $length;
    $logArr['escaped'] = $escaped;
    if (strlen($string) == 0) {
        $result = $string;
        return $result;
    }
    $result = trim(hilight_url_limit($string, $length, $escaped));
    $resultTmp = explode(" ", $result);
    $result = implode("", $resultTmp);
    if (false === $result) {
        $result = $string;
        $status = -1;
        $logArr['result'] = $result;
        CLog::warning("fail to call hilight_url_limit", $status, $logArr, 1);
        return $string;
    }
    $logArr['result'] = $result;
    CLog::debug("success to call url_limit", $status, $logArr, 1);
    return $result;
}
开发者ID:drehere,项目名称:shenmegui,代码行数:33,代码来源:modifier.url_limit.php


示例7: smarty_modifier_strlen_character

/**
 *
 *
 * @file modifier.strlen_character.php
 * @package plugins
 * @purpose: Calculate the number of characters of a string
 * @author [email protected]
 * @date 2014-03-07 14:02
 */
function smarty_modifier_strlen_character($string)
{
    $logArr['smarty_modifier'] = "modifier_strlen_character";
    $status = 0;
    $intI = 0;
    $intCount = 0;
    $logArr['string'] = $string;
    $intLength = strlen($string);
    if ($intLength == 0) {
        $status = -1;
        CLog::warning("string is empty", $status, $logArr, 1);
        return 0;
    }
    while ($intI < $intLength) {
        $chrAscii = ord($string[$intI]);
        //按字节转成ascii码
        $intCount++;
        $intI++;
        if ($intI >= $intLength) {
            break;
        }
        if ($chrAscii & 0x80) {
            //汉字的两个字符ascii码都大于0x80,此处判断是否为汉字
            $chrAscii <<= 1;
            while ($chrAscii & 0x80) {
                //判断为汉字,$intCount自增1.
                $intI++;
                $chrAscii <<= 1;
            }
        }
    }
    return $intCount;
}
开发者ID:drehere,项目名称:shenmegui,代码行数:42,代码来源:modifier.strlen_character.php


示例8: smarty_function_widget

/**
 *
 *
 * @file function.widget.php
 * @package plugins
 * @author [email protected]
 * @date 2011-11-03 10:47
 */
function smarty_function_widget($params, Smarty_Internal_Template $template)
{
    $logArr['smarty_function'] = "function_widget";
    $name = $params['name'];
    $tpl_path = $params['path'];
    $fn = 'smarty_template_function_' . $name;
    $type = $template->smarty->getTemplateVars('_TEMPLATE_TYPE');
    $logArr['widget_name'] = $name;
    $logArr['widget_type'] = $type;
    $logArr['widget_path'] = $tpl_path;
    if (!function_exists($fn)) {
        //$tpl_path = CSmarty::getWidgetPath($type, $name);
        if (!$template->smarty->templateExists($tpl_path)) {
            $log_str = "widget not found :{$tpl_path}";
            CSmarty::addError($log_str);
            CLog::warning($log_str, -1, $logArr, 1);
            return false;
        }
        $template->smarty->fetch($tpl_path);
    }
    if (!function_exists($fn)) {
        $log_str = "template function {$fn} not found";
        CSmarty::addError($log_str);
        CLog::warning($log_str, -1, $logArr, 1);
        return false;
    } else {
        $result = $fn($template, $params);
    }
    return $result;
}
开发者ID:drehere,项目名称:shenmegui,代码行数:38,代码来源:function.widget.php


示例9: smarty_modifier_format_int

/**
 *
 *
 * @file modifier.format_int.php
 * @package plugins
 * @author [email protected]
 * @date 2011-11-03 10:47
 */
function smarty_modifier_format_int($number)
{
    $logArr['smarty_modifier'] = "modifier_format_int";
    $status = 0;
    $number = sprintf("%F", $number);
    $logArr['number'] = $number;
    $size = strlen($number);
    for ($i = $size - 1, $j = 1; $i >= 0; $i--, $j++) {
        $word = substr($number, $i, 1);
        if ($word === ".") {
            $result = "";
            $j = 0;
            continue;
        }
        if ($i < 3) {
            $result = $word . $result;
        } else {
            $result = "0" . $result;
        }
        if ($j % 3 == 0 && $i != 0) {
            $result = "," . $result;
        }
    }
    $logArr['result'] = $result;
    CLog::debug("success to call format_int", $status, $logArr, 1);
    return $result;
}
开发者ID:drehere,项目名称:shenmegui,代码行数:35,代码来源:modifier.format_int.php


示例10: 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


示例11: 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


示例12: __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


示例13: 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


示例14: mux

 public function mux($logged)
 {
     $session = new USession();
     $VIndex = new VIndex();
     switch ($VIndex->getController()) {
         case 'log':
             $CLog = new CLog();
             $log = $CLog->mux();
             if ($VIndex->getTask() == 'in' || $VIndex->getTask() == 'out') {
                 $VIndex->deleteController();
                 $VIndex->deleteTask();
                 return $this->setPage();
             } else {
                 return $log;
             }
         case 'rent':
             if ($logged >= 0) {
                 $CRent = new CRent();
                 return $CRent->mux();
             } else {
                 return $VIndex->fetch('forbidden_user.tpl');
             }
         case 'user':
             if ($logged >= 0) {
                 $CUser = new CUser();
                 return $CUser->mux();
             } else {
                 return $VIndex->fetch('forbidden_user.tpl');
             }
         case 'admin':
             if ($logged >= 1) {
                 $CAdmin = new CAdmin();
                 return $CAdmin->mux();
             } else {
                 return $VIndex->fetch('forbidden_admin.tpl');
             }
         case 'static':
             $CStatic = new CStatic();
             return $CStatic->mux($logged);
         default:
             $CStatic = new CStatic();
             return $CStatic->mux($logged);
     }
 }
开发者ID:AngeloDamiani,项目名称:MyBeach,代码行数:44,代码来源:CIndex.class.php


示例15: setItem

 public function setItem($key, $val, $expiration = 0)
 {
     //$val = implode(' ',$val);
     $val = serialize($val);
     $rc = $this->_cacheBase->set($key, $val, $expiration);
     if (false === $rc) {
         CLog::warning("ImgPredict setItem failed," . $this->_cacheBase->getErrMsg());
     }
     return $rc;
 }
开发者ID:drehere,项目名称:shenmegui,代码行数:10,代码来源:ImagePredict.php


示例16: 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


示例17: 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


示例18: 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


示例19: getCssJs

 public static function getCssJs($type, $arrTplNames, $arrCSSUI)
 {
     $cssStr = '';
     $jsStr = '';
     $cssUI = '';
     $strLog = '';
     $uiArr = array();
     // 必须去重
     $arrTplNames = array_keys(array_flip($arrTplNames));
     $arrSmartyConf = CSmarty::getConf();
     // 预处理CSS、JS合并,读取文件
     foreach ($arrTplNames as $tpl) {
         $cssjsPath = CSmarty::getHeadCssFootJsPath(VUI_TEMPLATE_PATH, $arrSmartyConf['platform'], $arrSmartyConf['language'], $type, $tpl);
         if (!file_exists($cssjsPath)) {
             continue;
         }
         require "{$cssjsPath}";
         $strLog .= $tpl . '(';
         $className = 'CssJs_Util_' . $tpl;
         if (class_exists($className) && method_exists($className, 'getHeadCss')) {
             $cssStr .= call_user_func(array($className, 'getHeadCss'));
             if (!empty($cssStr)) {
                 $strLog .= 'css,';
             }
         }
         if (class_exists($className) && method_exists($className, 'getFootJs')) {
             $jsStr .= call_user_func(array($className, 'getFootJs'));
             if (!empty($jsStr)) {
                 $strLog .= 'js,';
             }
         }
         if (class_exists($className) && method_exists($className, 'getCssUI')) {
             $arrUis = call_user_func(array($className, 'getCssUI'));
             if (!empty($arrUis) && is_array($arrUis)) {
                 $uiArr = array_merge($uiArr, $arrUis);
                 $strLog .= implode('_', $arrUis);
             }
         }
         $strLog .= ')';
     }
     $uiArr = array_unique($uiArr);
     if (!empty($uiArr)) {
         // 通用组件的位置放在大搜索目录下
         foreach ($uiArr as $ui) {
             if (empty($arrCSSUI[$ui]['common'])) {
                 CLog::warning("Invalid UiCss:{$ui}");
             } else {
                 $cssUI .= $arrCSSUI[$ui]['common'];
             }
         }
     }
     $GLOBALS['logArr']['merge'] = $strLog;
     return array('cssMerge' => $cssUI . ' ' . $cssStr, 'jsMerge' => $jsStr);
 }
开发者ID:drehere,项目名称:shenmegui,代码行数:54,代码来源:CssHeadJsFoot.php


示例20: testOut

 /**
  * @covers MarketMeSuite\Phranken\Commandline\CLog::out
  */
 public function testOut()
 {
     // make protected method accessible for testing
     $method = new \ReflectionMethod('MarketMeSuite\\Phranken\\Commandline\\CLog', 'out');
     $method->setAccessible(true);
     // test output
     $expected = 'message';
     // capture actual
     ob_start();
     $method->invoke($this->object, $expected);
     $actual = ob_get_clean();
     $this->assertEquals($expected, $actual);
     // test output suppression
     $this->object->suppressOutput(true);
     $expected = false;
     // capture actual
     ob_start();
     $method->invoke($this->object, 'message');
     $actual = ob_get_clean();
     $this->assertEquals($expected, $actual);
 }
开发者ID:marketmesuite,项目名称:phranken-php,代码行数:24,代码来源:CLogTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CMS类代码示例发布时间:2022-05-23
下一篇:
PHP CLocale类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap