本文整理汇总了PHP中Game::getGameId方法的典型用法代码示例。如果您正苦于以下问题:PHP Game::getGameId方法的具体用法?PHP Game::getGameId怎么用?PHP Game::getGameId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Game
的用法示例。
在下文中一共展示了Game::getGameId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: punishAndDie
function punishAndDie(Team $team, Game $game)
{
$team->addPenatly($game->getGameId(), $game->getRound());
rollbackAndDie();
}
示例2: equals
public function equals(Game $game)
{
return $this->getGameId() == $game->getGameId();
}
示例3: testGetValidGameByGameId
/**
* test inserting a valid Game and regrabbing it from mySQL
**/
public function testGetValidGameByGameId()
{
// count the number of rows and save it for later
$numRows = $this->getConnection()->getRowCount("game");
// create a new Game and insert to into mySQL
$game = new Game(null, $this->game->getGameId(), $this->VALID_GAME);
$game->insert($this->getPDO());
// grab the data from mySQL and enforce the fields match our expectations
$pdoGame = Game::getGameByGameId($this->getPDO(), $game->getGameId());
$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount("game"));
$this->assertEquals($pdoGame->getGameId(), $this->game->getGameId());
}
示例4: history
private function history()
{
$current_game = new Game($this->getGameId());
$current_game->build();
db_insert('game_history')->fields(array('gameid' => $current_game->getGameId(), 'home_teamid' => $current_game->getHomeTeamId(), 'visiting_teamid' => $current_game->getVisitingTeamId(), 'locationid' => $current_game->getLocationId(), 'seasonid' => $current_game->getSeasonId(), 'start_datetime' => $current_game->getStartDateTime(), 'playoff_game_yn' => $current_game->getPlayoffGameYN(), 'saved_userid' => $current_game->getSavedUserID(), 'saved_datetime' => $current_game->getSavedDateTime(), 'history_userid' => $this->getSavedUserID(), 'history_datetime' => $this->getSavedDateTime(), 'home_team_first_period_goals' => $current_game->getHomeTeamFirstPeriodGoals(), 'visiting_team_first_period_goals' => $current_game->getVisitingTeamFirstPeriodGoals(), 'home_team_second_period_goals' => $current_game->getHomeTeamSecondPeriodGoals(), 'visiting_team_second_period_goals' => $current_game->getVisitingTeamSecondPeriodGoals(), 'home_team_third_period_goals' => $current_game->getHomeTeamThirdPeriodGoals(), 'visiting_team_third_period_goals' => $current_game->getVisitingTeamThirdPeriodGoals(), 'home_team_over_time_goals' => $current_game->getHomeTeamOverTimeGoals(), 'visiting_team_over_time_goals' => $current_game->getVisitingTeamOverTimeGoals(), 'home_team_shots' => $current_game->getHomeTeamShots(), 'visiting_team_shots' => $current_game->getVisitingTeamShots(), 'comment' => $current_game->getComment()))->execute();
}