getToken(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set token * * @param string $token */ public function setToken($token) { $this->token = $token; } /** * Get token * * @return string */ public function getToken() { return $this->token; } /** * Set used * * @param boolean $used */ public function setUsed($used) { $this->used = $used; } /** * Get used * * @return boolean */ public function getUsed() { return $this->used; } public function getCount() { if (!$this->count) { return 0; } return $this->count; } public function setCount($count) { $this->count = $count; } public function addUseCount() { $this->setCount($this->getCount()+1); if ($this->getCount() >= $this->count_max) { $this->setUsed(true); } } public function getCountMax() { return $this->count_max; } public function setCountMax($count_max) { $this->count_max = $count_max; } }