Created
February 22, 2014 11:54
-
-
Save ianbarber/9152784 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Quiz; | |
use Symfony\Component\HttpFoundation\Request; | |
class Answer { | |
public $userid; | |
public $questionid; | |
public $country; | |
public $correct; | |
public $writetime; | |
public function __construct() { | |
$this->writetime = time(); | |
} | |
public function getProperties() { | |
$props = array(); | |
$props['userid'] = new \Google_Service_Datastore_Property(); | |
$props['userid']->setStringValue($this->userid); | |
$props['questionid'] = new \Google_Service_Datastore_Property(); | |
$props['questionid']->setIntegerValue($this->questionid); | |
$props['country'] = new \Google_Service_Datastore_Property(); | |
$props['country']->setStringValue($this->country); | |
$props['correct'] = new \Google_Service_Datastore_Property(); | |
$props['correct']->setStringValue($this->correct); | |
$props['writetime'] = new \Google_Service_Datastore_Property(); | |
$props['writetime']->setDateTimeValue(date("c", $this->writetime)); | |
return $props; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment