id = $this->generateKeyID(); $this->rider = null; $this->is_active = true; } public function generateKeyID() { // use uniqid for now, since primary key dupes will trigger exceptions return uniqid(); } public function getID() { return $this->id; } public function setDevicePushID($id) { $this->device_push_id = $id; return $this; } public function getDevicePushID() { return $this->device_push_id; } public function setRider(Rider $rider = null) { $this->rider = $rider; return $this; } public function getRider() { return $this->rider; } public function setPhoneNumber($num) { $this->phone_number = $num; return $this; } public function getPhoneNumber() { return $this->phone_number; } public function setActive($flag = true) { $this->is_active = $flag; return $this; } public function isActive() { return $this->is_active; } public function hasRider() { if ($this->rider == null) return false; return true; } }