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


PHP Application::getLog方法代码示例

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


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

示例1: bootstrap

 /**
  * Bootstrap method to be called during application bootstrap stage.
  * Adding routing rules and log target.
  * 
  * @param \yii\base\Application $app the application currently running
  */
 public function bootstrap($app)
 {
     if ($app instanceof WebApplication) {
         $app->getUrlManager()->addRules([new GroupUrlRule(['prefix' => 'podium', 'rules' => ['activate/<token:[\\w\\-]+>' => 'account/activate', 'admin/ban/<id:\\d+>' => 'admin/ban', 'admin/contents/<name:[\\w\\-]+>' => 'admin/contents', 'admin/delete/<id:\\d+>' => 'admin/delete', 'admin/delete-category/<id:\\d+>' => 'admin/delete-category', 'admin/delete-forum/<cid:\\d+>/<id:\\d+>' => 'admin/delete-forum', 'admin/edit-category/<id:\\d+>' => 'admin/edit-category', 'admin/edit-forum/<cid:\\d+>/<id:\\d+>' => 'admin/edit-forum', 'admin/forums/<cid:\\d+>' => 'admin/forums', 'admin/mod/<uid:\\d+>/<fid:\\d+>' => 'admin/mod', 'admin/mods/<id:\\d+>' => 'admin/mods', 'admin/new-forum/<cid:\\d+>' => 'admin/new-forum', 'admin/pm/<id:\\d+>' => 'admin/pm', 'admin/update/<id:\\d+>' => 'admin/update', 'admin/view/<id:\\d+>' => 'admin/view', 'admin' => 'admin/index', 'category/<id:\\d+>/<slug:[\\w\\-]+>' => 'default/category', 'delete/<cid:\\d+>/<fid:\\d+>/<id:\\d+>/<slug:[\\w\\-]+>' => 'default/delete', 'deletepost/<cid:\\d+>/<fid:\\d+>/<tid:\\d+>/<pid:\\d+>' => 'default/deletepost', 'deleteposts/<cid:\\d+>/<fid:\\d+>/<id:\\d+>/<slug:[\\w\\-]+>' => 'default/deleteposts', 'demote/<id:\\d+>' => 'admin/demote', 'edit/<cid:\\d+>/<fid:\\d+>/<tid:\\d+>/<pid:\\d+>' => 'default/edit', 'forum/<cid:\\d+>/<id:\\d+>/<slug:[\\w\\-]+>' => 'default/forum', 'home' => 'default/index', 'install' => 'install/run', 'last/<id:\\d+>' => 'default/last', 'lock/<cid:\\d+>/<fid:\\d+>/<id:\\d+>/<slug:[\\w\\-]+>' => 'default/lock', 'login' => 'account/login', 'logout' => 'profile/logout', 'members/posts/<id:\\d+>/<slug:[\\w\\-]+>' => 'members/posts', 'members/threads/<id:\\d+>/<slug:[\\w\\-]+>' => 'members/threads', 'members/view/<id:\\d+>/<slug:[\\w\\-]+>' => 'members/view', 'members' => 'members/index', 'members/ignore/<id:\\d+>' => 'members/ignore', 'messages/delete/<id:\\d+>' => 'messages/delete', 'messages/new/<user:\\d+>' => 'messages/new', 'messages/reply/<id:\\d+>' => 'messages/reply', 'messages/view/<id:\\d+>' => 'messages/view', 'move/<cid:\\d+>/<fid:\\d+>/<id:\\d+>/<slug:[\\w\\-]+>' => 'default/move', 'moveposts/<cid:\\d+>/<fid:\\d+>/<id:\\d+>/<slug:[\\w\\-]+>' => 'default/moveposts', 'new-email/<token:[\\w\\-]+>' => 'account/new-email', 'new-thread/<cid:\\d+>/<fid:\\d+>' => 'default/new-thread', 'pin/<cid:\\d+>/<fid:\\d+>/<id:\\d+>/<slug:[\\w\\-]+>' => 'default/pin', 'post/<cid:\\d+>/<fid:\\d+>/<tid:\\d+>/<pid:\\d+>' => 'default/post', 'post/<cid:\\d+>/<fid:\\d+>/<tid:\\d+>' => 'default/post', 'profile' => 'profile/index', 'profile/add/<id:\\d+>' => 'profile/add', 'profile/delete/<id:\\d+>' => 'profile/delete', 'profile/mark/<id:\\d+>' => 'profile/mark', 'promote/<id:\\d+>' => 'admin/promote', 'reactivate' => 'account/reactivate', 'register' => 'account/register', 'report/<cid:\\d+>/<fid:\\d+>/<tid:\\d+>/<pid:\\d+>/<slug:[\\w\\-]+>' => 'default/report', 'reset' => 'account/reset', 'rss' => 'default/rss', 'search' => 'default/search', 'show/<id:\\d+>' => 'default/show', 'thread/<cid:\\d+>/<fid:\\d+>/<id:\\d+>/<slug:[\\w\\-]+>' => 'default/thread']])], false);
         $dbTarget = new DbTarget();
         $dbTarget->logTable = '{{%podium_log}}';
         $dbTarget->categories = ['bizley\\podium\\*'];
         $dbTarget->logVars = [];
         $app->getLog()->targets['podium'] = $dbTarget;
     } elseif ($app instanceof ConsoleApplication) {
         $this->controllerNamespace = 'bizley\\podium\\console';
     }
 }
开发者ID:keltstr,项目名称:yii2-podium,代码行数:19,代码来源:Module.php


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