Esempio n. 1
0
 function display($id)
 {
     $game = new Game();
     $game->setId($id);
     $game = Query::getOne($game);
     return $game;
 }
Esempio n. 2
0
 static function load($id)
 {
     if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/datas/parties/" . $id) == false) {
         return null;
     }
     $content = unserialize(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/datas/parties/" . $id));
     $instance = new Game();
     $instance->setPlayers($content->getPlayers());
     $instance->setId($id);
     return $instance;
 }
Esempio n. 3
0
				$game = new Game();<br><br>
				
				$params = [<br>
				&nbsp;&nbsp;\'opponent\' => \'John\',<br>
				&nbsp;&nbsp;\'location\' => \'Outside\',<br>
				&nbsp;&nbsp;\'outcome\'  => \'L\',<br>
				&nbsp;&nbsp;\'datetime\' => \'2015-12-07 10:00:00\',<br>
				];<br><br>
				
				$game->setId($id);<br>
				$game = GameController::edit($game, $params);<br>
			</div>
		';
        $game = new Game();
        $params = ['opponent' => 'John', 'location' => 'Outside', 'outcome' => 'L', 'datetime' => '2015-12-07 10:00:00'];
        $game->setId($id);
        $game = GameController::edit($game, $params);
        $test_data .= '<div class="bg-success pad">';
        foreach ($game as $key => $value) {
            $test_data .= $key . ' : ' . $value . '<br>';
        }
        $test_data .= '</div>';
        $body = '
			<ol class="breadcrumb">
				<li><a href="index.php">Getting Started</a></li>
				<li><a class="active">Initial Testing</a></li>
			</ol>

			<div class="row">
				<div class="col-md-8">
					<p>Now that your scripts are generated, we will test the generated code. There are a set of default queries that can be used for basic CRUD. These will be our main focus to ensure the files were setup correctly.</p>