當前位置: 首頁>>代碼示例>>PHP>>正文


PHP yii::warning方法代碼示例

本文整理匯總了PHP中yii::warning方法的典型用法代碼示例。如果您正苦於以下問題:PHP yii::warning方法的具體用法?PHP yii::warning怎麽用?PHP yii::warning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在yii的用法示例。


在下文中一共展示了yii::warning方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: actionIndex

 /**
  * Lists all Country models.
  * @return mixed
  */
 public function actionIndex()
 {
     yii::warning('yyy aaa ', __METHOD__);
     $searchModel = new CountrySearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
開發者ID:yunlongmain,項目名稱:yii2-test,代碼行數:11,代碼來源:CountryController.php

示例2: actionLog

 public function actionLog($msg)
 {
     yii::warning('in actionLog ' . $msg);
 }
開發者ID:yunlongmain,項目名稱:yii2-test,代碼行數:4,代碼來源:SiteController.php

示例3: getPermissionList

 private function getPermissionList()
 {
     $meta = new MetaData();
     $allModule = $meta->getRouteMap();
     unset($meta);
     Yii::beginProfile(__CLASS__ . __METHOD__);
     $Ar_dataModel = [];
     //\yii::trace('Module Permission:'.__LINE__.'check rules'.print_r($this->permission_rules,true),__METHOD__);
     foreach ($allModule as $moduleName => $controllerMap) {
         if ($this->checkAccess($moduleName)) {
             //\yii::trace('Module Permission:'.__LINE__.'check rules permission for '.$moduleName,__METHOD__);
             //\yii::trace('Module Permission:'.__LINE__.'check rules permission for '.print_r($controllerMap,true),__METHOD__);
             foreach ($controllerMap as $controllerName => $actionMap) {
                 if ($this->checkAccess($moduleName, $controllerName)) {
                     //\yii::trace('Module Permission:'.__LINE__.'check rules permission for '.$moduleName.' and '.$controllerName,__METHOD__);
                     $map = [];
                     foreach ($actionMap as $action) {
                         if ($this->checkAccess($moduleName, $controllerName, $action)) {
                             //\yii::trace('Module Permission:'.__LINE__.'check rules permission for '.$moduleName.' and '.$controllerName.' and '.$action,__METHOD__);
                             $map[] = ucfirst($action);
                         }
                     }
                     if (count($map)) {
                         $Ar_dataModel[] = [ucfirst($moduleName), ucfirst($controllerName), implode(', ', $map)];
                     }
                 } else {
                     //No Controller Access
                     \yii::warning('Module Permission:' . __LINE__ . 'check rules no permission for ' . $moduleName . '|' . $controllerName . '|', __METHOD__);
                     continue;
                 }
             }
         } else {
             //No module Access then continue
             \yii::warning('Module Permission:' . __LINE__ . 'check rules no permission for ' . $moduleName, __METHOD__);
             continue;
         }
     }
     \yii::warning('Module Permission:' . __LINE__ . 'check rules no permission for ' . print_r($Ar_dataModel, true), __METHOD__);
     Yii::endProfile(__CLASS__ . __METHOD__);
     return new ArrayDataProvider(['allModels' => $Ar_dataModel, 'pagination' => false]);
 }
開發者ID:rajanishtimes,項目名稱:basicyii,代碼行數:41,代碼來源:PermissionTrait.php


注:本文中的yii::warning方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。