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


PHP log::accessLog方法代码示例

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


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

示例1: delete

 /**
  * 刪除 cache 資料
  * @access	public
  * @return	boolean
  * @since	2011-09-05
  */
 public function delete($key)
 {
     if ($key == '') {
         log::errorLog('$key is empty');
         return false;
     }
     if (!$this->_memcache->delete($key, 0)) {
         log::errorLog('memcacheLayer delete() failed');
         return false;
     }
     log::accessLog('memcacheLayer delete() successful');
     log::returnLog(true);
     return true;
 }
开发者ID:sajawa,项目名称:lib,代码行数:20,代码来源:memcache.php

示例2: set

 /**
  * set config
  * @access public
  * @static
  * @param string $name
  * @param mixed $value
  * @example
  * <p>
  * $name = 'database.params';
  * $value = array('host'=>'localhost', 'password'=>'xxx');
  * config::set($name, $value);
  * </p>
  */
 public static function set($name, $value)
 {
     $segments = explode('.', $name);
     if (1 < count($segments)) {
         $config =& self::$_config;
         for ($i = 0, $n = count($segments); $i < $n; $i++) {
             $segment =& $segments[$i];
             if ($i === $n - 1) {
                 $config[$segment] = $value;
             } else {
                 $config[$segment] = array();
             }
             $config =& $config[$segment];
         }
     } else {
         self::$_config[$name] = $value;
     }
     log::accessLog('config set[' . $name . '] success');
 }
开发者ID:sajawa,项目名称:lib,代码行数:32,代码来源:config.php

示例3: findCol

 /**
  * 取得資料表裡的其中一個欄位的所有內容.
  * @access public
  * @link find()
  * @return array
  * @example  $obj->findCol() ;
  */
 public function findCol($table, $field, $conditions = null, $limit = null, $limitStart = 0, $sorts = null)
 {
     if (!$field) {
         log::errorLog('$field is empty');
         return false;
     }
     $colArr = array();
     $arr = $this->find($table, $field, $conditions, $limit, $limitStart, $sorts);
     if ($arr === false) {
         log::errorLog('execute $this->find() fail');
         return false;
     } else {
         foreach ($arr as $ak => $av) {
             $colArr[] = $av[$field];
         }
     }
     log::accessLog('execute findCol success');
     log::returnLog($colArr);
     return $colArr;
 }
开发者ID:sajawa,项目名称:lib,代码行数:27,代码来源:abstract.php

示例4: delete

 /**
  * 刪除 cache 資料
  * @access	public
  * @return	string
  * @since	2011-09-08
  */
 public function delete($key)
 {
     if (!$key) {
         log::errorLog('$key is empty');
         return false;
     }
     //convert key to file. sha1 has 1/2^51 collision possibility.
     $fileSeed = sha1($key);
     $dir1 = substr($fileSeed, 0, 2);
     $dir2 = substr($fileSeed, 2, 2);
     $cacheFile = $this->_cacheFileTopDirectory . "{$dir1}/{$dir2}/{$fileSeed}";
     $cacheExpirationFile = "{$cacheFile}_expirationTime";
     if (!file_exists($cacheFile)) {
         return false;
     }
     if (unlink($cacheFile) && unlink($cacheExpirationFile)) {
         log::accessLog('fileCache delete() success');
         log::returnLog($str);
         return true;
     } else {
         log::errorLog('fileCache delete() failed');
         return false;
     }
 }
开发者ID:sajawa,项目名称:lib,代码行数:30,代码来源:file.php

示例5: _isset

 /**
  * 检查变量是否存在
  * @access public
  * @static
  * @link _isset
  * @param $key String 变量名
  * @return Boolean
  * @example registry::_isset('foo');
  */
 public static function _isset($key)
 {
     $flag = false;
     if (isset(self::$_var[$key])) {
         $flag = true;
     }
     if (self::$_enableLog) {
         if ($flag) {
             log::accessLog('access object of registry');
             log::returnLog('isset(' . $key . ') return true');
         } else {
             log::returnLog('isset(' . $key . ') return false');
         }
     }
     return $flag;
 }
开发者ID:sajawa,项目名称:lib,代码行数:25,代码来源:registry.php

示例6: _include

 /**
  * 载入视图文件
  */
 protected function _include($___filename, array $___vars = null)
 {
     $this->_extname = pathinfo($___filename, PATHINFO_EXTENSION);
     extract($this->_vars);
     if (is_array($___vars)) {
         extract($___vars);
     }
     include $___filename;
     log::accessLog('include a file success');
 }
开发者ID:sajawa,项目名称:lib,代码行数:13,代码来源:view.php

示例7: __destruct

 /**
  * cacheLayer析构函数
  */
 public function __destruct()
 {
     $this->_close();
     log::accessLog('cacheLayer is destructed');
 }
开发者ID:sajawa,项目名称:lib,代码行数:8,代码来源:layer.php

示例8: route

 /**
  * 路由转换处理
  * @access public
  */
 public function route()
 {
     $path = trim(urldecode($this->getPathInfo()), '/');
     $routeMatched = false;
     $routes = $this->_getRoutes();
     if (is_array($routes) && count($routes)) {
         foreach ($routes as $module => $rules) {
             if (is_array($rules) && count($rules)) {
                 foreach ($rules as $rule) {
                     if (isset($rule['rule']) && is_string($rule['rule'])) {
                         $pattern = '#^' . $rule['rule'] . '$#i';
                         $routeMatched = preg_match($pattern, $path, $matches);
                         if ($routeMatched) {
                             array_shift($matches);
                             if (isset($rule['matches']['controller'])) {
                                 $classFile = sprintf('%s/app/%s/%scontroller.php', PROJECT_ROOT, $module, $rule['matches']['controller']);
                                 if (!is_file($classFile)) {
                                     throw new Exception('Error controller file!(' . $rule['matches']['controller'] . ')');
                                     return false;
                                 }
                                 require_once $classFile;
                                 $className = sprintf('%s%sController', strtolower($module), ucfirst($rule['matches']['controller']));
                                 if (!class_exists($className, false)) {
                                     throw new Exception('Error controller name!(' . $className . ')');
                                     return false;
                                 }
                                 $action = 'index';
                                 if (isset($rule['matches']['action'])) {
                                     $action = $rule['matches']['action'];
                                 }
                                 $action = strtolower($action) . 'Action';
                                 $controllerObject = new $className();
                                 if (method_exists($controllerObject, 'init')) {
                                     $controllerObject->init();
                                 }
                                 if (!method_exists($controllerObject, $action)) {
                                     throw new Exception('Error action name(' . $className . '->' . $action . ')');
                                     return false;
                                 }
                                 call_user_func_array(array($controllerObject, $action), $matches);
                                 $routeMatched = true;
                                 break 2;
                             }
                         }
                     }
                 }
             }
         }
     }
     log::accessLog('Execute route() sucessful');
     log::returnLog($routeMatched);
     return $routeMatched;
 }
开发者ID:sajawa,项目名称:lib,代码行数:57,代码来源:router.php

示例9: __destruct

 public function __destruct()
 {
     if (!empty($this->_con)) {
         $this->close();
     }
     log::accessLog('access __destruct() success!');
 }
开发者ID:sajawa,项目名称:lib,代码行数:7,代码来源:mongo.php

示例10: __destruct

 public function __destruct()
 {
     if (!$this->close()) {
         log::errorLog('__destruct fail');
     }
     log::accessLog('access close() success!');
     //log::returnLog(true);
     //return true ;
 }
开发者ID:sajawa,项目名称:lib,代码行数:9,代码来源:mysql.php

示例11: query

 /**
  * 直接放置查询
  * @access public
  * @static
  * @param String $query
  * @return mixed
  * @example
  * <p>
  * accessLayer::query("SELECT * FROM sg_application");
  * </p>
  */
 public static function query($query, $accessType = self::MONGO_NS)
 {
     $result = self::_getInstance($accessType)->_connect()->query($query);
     log::accessLog('Access query() success');
     log::returnLog($result);
     return $result;
 }
开发者ID:sajawa,项目名称:lib,代码行数:18,代码来源:layer.php


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