示例#1
0
文件: Rank.php 项目: dieos2/bolaoyyi2
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIdPonto()
 {
     return $this->hasOne(Pontos::className(), ['id' => 'id_ponto']);
 }
示例#2
0
 /**
  * Finds the Pontos model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Pontos the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Pontos::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }