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


PHP Team::getByNefubId方法代码示例

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


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

示例1: getTeam

 /**
  * @return Team
  */
 public function getTeam()
 {
     if (!$this->team) {
         $this->team = Team::getByNefubId($this->team_nefub_id);
     }
     return $this->team;
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:10,代码来源:PouleTeam.php

示例2: runTeamSchedule

 protected function runTeamSchedule($nefubId, $date)
 {
     if (is_numeric($nefubId) && $date) {
         if ($oTeam = Team::getByNefubId($nefubId)) {
             $formattedDate = strftime("%A %e %B %Y", strtotime($date));
             $filename = 'agenda ' . $date . ' ' . $oTeam->name;
             $oSeason = Season::getInstance();
             $query = "SELECT Game.id FROM Game WHERE Game.date = '" . $date . "' \n\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t\t(\tGame.team1_nefub_id = '" . $oTeam->nefub_id . "' OR\n\t\t\t\t\t\t\t\t\tGame.team2_nefub_id = '" . $oTeam->nefub_id . "' OR\n\t\t\t\t\t\t\t\t\tGame.ref_team_nefub_id = '" . $oTeam->nefub_id . "')\n\t\t\t\t\t\t\tORDER BY Game.time, Game.field;\n\t\t\t\t\t\t";
             $aGames = Game::getAllFromQuery($query);
             if (count($aGames)) {
                 $title = 'Programma ' . $formattedDate . ' voor ' . utf8_decode($oTeam->name) . ' (' . $oTeam->getCompetition()->name . ')';
                 $footer = $title . '. Gedownload van http://' . $_SERVER['HTTP_HOST'] . '/team/' . $nefubId;
                 $this->renderGames($filename, $title, $aGames, $footer, false);
             }
         }
     }
     $this->redirect();
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:18,代码来源:DownloadRenderer.php

示例3: showTeam

 /**
  * 
  * @param int $nefubId
  */
 public function showTeam($nefubId = null)
 {
     $this->subdirectory = '/team';
     if ($nefubId) {
         $this->path = '/' . $nefubId;
         $this->template = '/team/team.tpl';
         if ($this->getClearRender()) {
             $oTeam = Team::getByNefubId($nefubId);
             if ($oTeam) {
                 $this->assign('oTeam', $oTeam);
                 $finishedGames = $oTeam->getFinishedGames();
                 $aPlannedGames = $oTeam->getPlannedGames();
                 $finishedGamesCount = count($finishedGames);
                 $plannedGamesCount = count($plannedGames);
                 $players = $oTeam->getTeamPersons();
                 $playerCount = count($players);
                 $this->assign('playerCount', $playerCount);
                 $this->assign('aFinishedGames', $oTeam->getFinishedGames());
                 $this->assign('finishedGamesCount', $finishedGamesCount);
                 $this->assign('aPlannedGames', $aPlannedGames);
                 $this->assign('plannedGamesCount', $plannedGamesCount);
             } else {
                 $this->redirect('/team');
             }
         }
     } else {
         $this->path = '/index';
         $this->template = '/team/view.tpl';
         if ($this->getClearRender()) {
             $aSortedTeams = Team::getSortedByAlphabet();
             $this->assign('aSortedTeams', $aSortedTeams);
         }
     }
     $this->showOutput();
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:39,代码来源:FrontRenderer.php

示例4: updateTeams

 public function updateTeams()
 {
     $aPoules = Poule::getAll(array('season_nefub_id' => Season::getInstance()->nefub_id), 'competition_nefub_id');
     foreach ($aPoules as $oPoule) {
         $aPouleTeams = $oPoule->getPouleTeams();
         foreach ($aPouleTeams as $oPouleTeam) {
             $team = $this->getAPITeamDetails($oPouleTeam->team_nefub_id);
             $oTeam = Team::getByNefubId($team->ID);
             if (!$oTeam) {
                 $oTeam = new Team();
                 $oTeam->nefub_id = $team->ID;
                 $oTeam->name = $team->Name;
                 $oTeam->competition_nefub_id = $oPoule->competition_nefub_id;
                 $oTeam->season_nefub_id = $oPoule->getCompetition()->season_nefub_id;
                 $oTeam->club_nefub_id = $team->Club->ID;
                 $oTeam->color_shirt = $team->Dress->Shirt;
                 $oTeam->color_shorts = $team->Dress->Short;
                 self::put('Team ' . $team->Name . ' toegevoegd');
                 $oTeam->save();
             }
             if (isset($team->Players) && is_array($team->Players)) {
                 foreach ($team->Players as $teamPlayer) {
                     $this->convertTeamPerson($teamPlayer, $oTeam);
                 }
             } else {
                 self::put('Geen spelers gevonden voor ' . $team->Name);
             }
             $this->retrieveClub($team->Club);
             $this->retrieveTeamGames($team, 'schedule');
             $query = "SELECT COUNT(Game.nefub_id) as countGames\n\t\t\t\t\t\t\tFROM Game\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t(team1_nefub_id = '" . $team->ID . "'\n\t\t\t\t\t\t\t\tOR\n\t\t\t\t\t\t\t\tteam2_nefub_id = '" . $team->ID . "')\n\t\t\t\t\t\t\t\tAND\n\t\t\t\t\t\t\t\tGame.date <= CURDATE()";
             $rows = Database::select_rows_by_query($query);
             $playedGames = $rows[0]['countGames'];
             $bRetrieveResults = false;
             if ($playedGames) {
                 // Als er geen oude wedstrijden in de DB staan, vermoedelijk zijn ze dan niet eerder opgehaald.
                 $query .= " AND Game.actions_retrieved = 0";
                 $rows = Database::select_rows_by_query($query);
                 $gamesToRetrieve = $rows[0]['countGames'];
                 $bRetrieveResults = $gamesToRetrieve != 0;
             }
             if ($bRetrieveResults) {
                 $this->retrieveTeamGames($team, 'results');
             } else {
                 self::put('Resultaten voor ' . $oTeam->name . ' hoeven niet vernieuwd te worden');
             }
             $oTeam->save();
             $this->retrievedTeamNefubIds[$oPouleTeam->team_nefub_id] = true;
         }
     }
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:50,代码来源:MapperRetriever.php

示例5: showTeams

 protected function showTeams()
 {
     switch ($this->mode) {
         case 'bewerken':
             $oTeam = Team::getByNefubId($this->editId);
             $this->editObject($oTeam);
             break;
         default:
             $this->showCompetitionDependentView('/teams.tpl');
     }
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:11,代码来源:AdminRenderer.php

示例6: getTeam2

 /**
  * Enter description here ...
  * @return Team
  */
 public function getTeam2()
 {
     return Team::getByNefubId($this->team2_nefub_id);
 }
开发者ID:rjpijpker,项目名称:nefub-mobile,代码行数:8,代码来源:Game.php


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