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


PHP yii::endProfile方法代码示例

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


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

示例1: renderContent

 protected function renderContent()
 {
     yii::beginProfile('loc');
     $session = new CHttpSession();
     $session->open();
     $newCountry = $this->newCountry ? $this->newCountry : ($session['top-country'] ? $session['top-country'] : $this->defaultCountry);
     $session['top-country'] = $newCountry;
     $newCity = $this->newCity ? $this->newCity : ($session['top-city'] ? $session['top-city'] : $this->defaultCity);
     $session['top-location'] = $newCity;
     if ($newCountry == "international") {
         $country = 'international';
         $city = GeoCityApi::getCityByName($newCity);
         if ($city) {
             $cities = GeoCityApi::getTopPrioritiesInternational($city->id);
         } else {
             $cities = GeoCityApi::getTopPrioritiesInternational();
         }
     } else {
         $country = GeoCountryApi::getCountryByName($newCountry);
         $city = GeoCityApi::getCityByName($newCity);
         if ($country && $city) {
             $cities = GeoCityApi::getTopPrioritiesByCountry($country->id, $city->id);
         } elseif ($country) {
             $cities = GeoCityApi::getTopPrioritiesByCountry($country->id);
         }
     }
     if ($country && $cities) {
         $this->render('topLocation', array('city' => $city, 'country' => $country, 'current' => $this->current, 'cities' => $cities));
     }
     yii::endProfile('loc');
 }
开发者ID:romeo14,项目名称:wallfeet,代码行数:31,代码来源:TopLocation.php

示例2: renderContent

 protected function renderContent()
 {
     yii::beginProfile('top-cities');
     $country = GeoCountryApi::getCountryByName($this->country);
     $cities = GeoCityApi::getTopPrioritiesByCountry($country->id);
     $this->render('topCities', array('cities' => $cities));
     yii::endProfile('top-cities');
 }
开发者ID:romeo14,项目名称:wallfeet,代码行数:8,代码来源:TopCities.php

示例3:

<?php

/**
 * Created by PhpStorm.
 * User: x.guo
 * Date: 2016/4/4
 * Time: 18:18
 */
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\Menu;
use yii\widgets\Breadcrumbs;
use frontend\assets\FrontendAsset;
yii::beginProfile('mainAsset', 'gx');
FrontendAsset::register($this);
yii::endProfile('mainAsset', 'gx');
$this->title = 'admin';
$baseUrl = Yii::getAlias('@web');
?>

<?php 
$this->beginPage();
?>

    <!DOCTYPE html>
    <html lang="<?php 
echo Yii::$app->language;
?>
">

    <head>
开发者ID:xidiao,项目名称:gxfenxi,代码行数:31,代码来源:adminlte_main.php


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