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


PHP Match::model方法代码示例

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


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

示例1: actionIndex

 public function actionIndex()
 {
     Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/enjoy.css');
     Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/lanrenzhijia.css');
     Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/jquery.roundabout.js');
     Yii::app()->clientScript->registerScriptFile(Yii::app()->theme->baseUrl . '/js/lanrenzhijia.js');
     $house_image_list = House::model()->findAll(array('select' => 'id, addr, image_list', 'condition' => 'lp_dol>3000000', 'order' => 'id DESC', 'limit' => 1));
     $city_houses = array();
     $subject_list = Subject::model()->findAll(array('order' => 'id DESC'));
     foreach ($subject_list as $obj) {
         $criteria = new CDbCriteria();
         $criteria->addCondition('city_id=' . $obj->city_id);
         $criteria->addCondition('lp_dol>3000000');
         $criteria->order = 'id DESC';
         $criteria->limit = 4;
         $house_list = House::model()->findAll($criteria);
         $city_houses[$obj->city_id] = $house_list;
     }
     $matches = Match::model()->findAll();
     $data = array('house_image_list' => $house_image_list[0], 'subject_list' => $subject_list, 'city_houses' => $city_houses, 'matches' => $matches);
     $this->render('index', $data);
 }
开发者ID:zywh,项目名称:maplecity,代码行数:22,代码来源:EnjoyController0421.php

示例2: updateMatchesFromChallonge

 public function updateMatchesFromChallonge()
 {
     $c = new ChallongeAPI(Yii::app()->params['challonge_api']);
     $params = array();
     $matches = $c->getMatches($this->challonge_id, $params);
     foreach ($matches as $k => $match) {
         $_match = Match::model()->findByAttributes(array('tournament_id' => $this->id, 'challonge_match_id' => $match->match->id));
         if ($_match) {
             $_match->team_1 = strlen($match->match->player1_id) ? $match->match->player1_id : '';
             $_match->team_2 = strlen($match->match->player2_id) ? $match->match->player2_id : '';
             $_match->identifier = $match->match->identifier;
             $_match->round = $match->match->round;
             $_match->state = $match->match->state;
             $_match->winner = $match->match->winner_id;
             $_match->loser = $match->match->loser_id;
             $_match->save();
         }
     }
 }
开发者ID:cfletcher1856,项目名称:austinblinddraw,代码行数:19,代码来源:Tournament.php

示例3: loadModel

 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Match the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Match::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
开发者ID:first-lab,项目名称:tebing,代码行数:15,代码来源:MatchController.php

示例4: actionCompare

 public function actionCompare()
 {
     $this->layout = ' ';
     Yii::app()->clientScript->registerCssFile(Yii::app()->theme->baseUrl . '/css/compare.css');
     $data = Yii::app()->request->getQuery('id');
     $ids = explode(',', $data);
     $criteria = new CDbCriteria();
     $criteria->addInCondition('id', $ids);
     $house_list = House::model()->findAll($criteria);
     $link_list = Link::model()->findAll();
     $matches = Match::model()->findAll();
     $this->render('compare', array('house_list' => $house_list, 'link_list' => $link_list, 'matches' => $matches));
 }
开发者ID:zywh,项目名称:maplecity,代码行数:13,代码来源:TestController.php

示例5: _groupList

 /**
  * 取用户组列表
  * @param $type
  */
 protected function _groupList($type = 'user')
 {
     switch ($type) {
         case 'user':
             return AdminGroup::model()->findAll();
             break;
         case 'subject':
             return Subject::model()->findAll();
             break;
         case 'city':
             return City::model()->findAll();
             break;
         case 'district':
             return District::model()->findAll();
             break;
         case 'investType':
             return InvestType::model()->findAll();
             break;
         case 'propertyType':
             return PropertyType::model()->findAll();
             break;
         case 'house':
             return House::model()->findAll();
             break;
         case 'match':
             return Match::model()->findAll();
             break;
     }
 }
开发者ID:zywh,项目名称:maplecity,代码行数:33,代码来源:XAdminiBase.php


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