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


PHP Logger::_instance方法代码示例

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


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

示例1: instance

 /**
  * 单例
  * @param array $config
  */
 public static function instance()
 {
     if (self::$_instance === NULL) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
开发者ID:phpengineer,项目名称:tinyPHP,代码行数:11,代码来源:logger.php

示例2: GetInstance

 /**
  * @param none
  * @return instance of Logger class
  */
 public static function GetInstance()
 {
     if (self::$_instance == NULL) {
         self::$_instance = new Logger();
     }
     return self::$_instance;
 }
开发者ID:tornado05,项目名称:phpAuthTask,代码行数:11,代码来源:Logger.php

示例3: getInstance

 /**
  * Get an instance of the Logger object
  *
  * @return Object of this class
  */
 public static function getInstance()
 {
     if (!self::$_instance) {
         $className = __CLASS__;
         self::$_instance = new $className();
     }
     return self::$_instance;
 }
开发者ID:nikhilpatel1989,项目名称:Transporter-Server,代码行数:13,代码来源:Logger.php

示例4: getInstance

 /**
  * Get the unique instance that can be exist of this class.
  * Singleton software patter premise.
  *
  * @param \Doctrine\ORM\EntityManager $entityManager
  * @return type
  */
 public static function getInstance(\Doctrine\ORM\EntityManager $entityManager)
 {
     if (!isset($_instance)) {
         Logger::$_instance = new Logger();
     }
     Logger::$_instance->_entityManager = $entityManager;
     return Logger::$_instance;
 }
开发者ID:laiello,项目名称:zend-ifc-controller-action-configuration,代码行数:15,代码来源:Logger.php

示例5: log

 public static function log($level = self::INFO, $application, $action, $message, $writeMethod)
 {
     // nao faz login se USE_LOGGER eh falso
     if (USE_LOGGER === false) {
         return;
     }
     if (!isset(self::$_instance)) {
         self::$_instance = new Logger();
         self::$_dbinfo = isset($_SESSION['phpgw_info']['expressomail']['server']['loggerdb']) ? $_SESSION['phpgw_info']['expressomail']['server']['loggerdb'] : $GLOBALS['phpgw_info']['server']['loggerdb'];
     }
     $application = strtolower($application);
     $action = strtolower($action);
     if ($writeMethod === Logger::IN_DB) {
         self::$_instance->writeDB($level, $application, $action, $message);
     } else {
         self::$_instance->writeFile($level, $application, $action, $message);
     }
 }
开发者ID:cjvaz,项目名称:expressomail,代码行数:18,代码来源:Logger.php

示例6: getInstance

 /**
  * Public method to get An instance of the Logger class
  * @return object
  */
 public static function getInstance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
开发者ID:ALCHEMIST09,项目名称:one-square-foot,代码行数:11,代码来源:class.Logger.php


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