public static function init() { if (is_null($storage)) { Import::load(CORE_PATH . 'Logs/KLogger.php'); static::$storage = KLogger::instance(LOG_PATH, KLogger::DEBUG); } return static::$storage; }
namespace Think\Library; /** * Library/RbacAuth.class.php * Smart ThinkPHP * Copyright (c) 2004-2013 Methink * * @copyright Copyright (c) Methink * @link https://github.com/minowu/extend * @package Library.RbacAuth * @since Smart ThinkPHP Extend 1.0.0 * @license Apache License (http://www.apache.org/licenses/LICENSE-2.0) */ use Think\Import; Import::load(dirname(__FILE__) . '/Auth' . EXT); /** * 配置方法 */ /* return array( 'AUTH_KEY' => 'USER_AUTH_KEY', 'AUTH_RULES' => array( // Public 1 => array( 'Home/Index/index' => true, 'Home/Account/login' => true,
/** * 过滤器方法 引用传值 * * @param string $name 过滤器名称 * @param string $content 要过滤的内容 * * @return void */ function filter($name, &$content) { $class = $name . 'Filter'; Import::load(GROUP_PATH . 'Filter/' . $class . EXT); $filter = new $class(); $content = $filter->run($content); }