targets = new ArrayCollection(); $this->games = new ArrayCollection(); } public function createTarget(Emotion $emotion, float $score, float $time) { $pos = $this->targets->count()+1; $target = new Target($this, $pos, $emotion, $score, $time); $this->targets->set($pos, $target); } /** * Sets the value of id. * * @param integer $id the id * * @return self */ public function setId($id) { $this->id = $id; return $this; } /** * Sets the Name of the level. * * @param string $name the name * * @return self */ public function setName($name) { $this->name = $name; return $this; } /** * Gets the value of id. * * @return integer */ public function getId() { return $this->id; } }