simple fix for hylafax
[openemr.git] / entities / ProductRegistration.php
blob3d55d8fd45b9df0a8be7322686538b5df34882b7
1 <?php
2 /**
3 * Product Registration entity.
5 * Copyright (C) 2017 Sherwin Gaddis <sherwingaddis@gmail.com>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
18 * @package OpenEMR
19 * @author Sherwin Gaddis <sherwingaddis@gmail.com>
20 * @link http://www.open-emr.org
23 namespace entities;
25 use Doctrine\ORM\Mapping\Entity;
26 use Doctrine\ORM\Mapping\Table;
27 use Doctrine\ORM\Mapping\Column;
28 use Doctrine\ORM\Mapping\Id;
30 /**
31 * @Table(name="product_registration")
32 * @Entity(repositoryClass="repositories\ProductRegistrationRepository")
34 class ProductRegistration {
35 /**
36 * Default constructor.
38 public function __construct(){
42 /**
43 * @Id
44 * @Column(name="registration_id"), type="char", length=36 nullable=false, options={"default" : 0})
46 private $registrationId;
48 /**
49 * @Column(name="email"), type="varchar", length=255 nullable=false, options={"default" : 0})
51 private $email;
53 /**
54 * @Column(name="opt_out"), type="tinyint", length=1 nullable=false, options={"default" : 0})
56 private $optOut;
58 /**
59 * Status that can be set/get as a human-readable string for the client. Not stored in the database.
61 private $statusAsString;
63 /**
64 * Getter for registration id.
66 * return registration id
68 public function getRegistrationId() {
69 return $this->registrationId;
72 /**
73 * Setter for registration id.
75 * @param registration id
77 public function setRegistrationId($value) {
78 $this->registrationId = $value;
81 /**
82 * Getter for email.
84 * return email string
86 public function getEmail() {
87 return $this->email;
90 /**
91 * Setter for email.
93 * @param email string
95 public function setEmail($value) {
96 $this->email = $value;
99 /**
100 * Getter for opt out.
102 * return opt out string
104 public function getOptOut() {
105 return $this->optOut;
109 * Setter for opt out.
111 * @param opt out number
113 public function setOptOut($value) {
114 $this->optOut = $value;
118 * Setter for status that can be set/get as a human-readable string for the client.
119 * Not stored in the database.
121 * return human-readable status.
123 public function getStatusAsString() {
124 return $this->statusAsString;
128 * Getter for status that can be set/get as a human-readable string for the client.
129 * Not stored in the database.
131 * @param human-readable status.
133 public function setStatusAsString($value) {
134 $this->statusAsString = $value;
138 * ToString of the entire object.
140 * @return object as string
142 public function __toString() {
143 return "registrationId: '" . $this->getRegistrationId() . "' " .
144 "email: '" . $this->getEmail() . "' " .
145 "statusAsString: '" . $this->getStatusAsString() . "' " .
146 "optOut" . $this->getOptOut() . "' " ;
150 * ToSerializedObject of the entire object.
152 * @return object as serialized object.
154 public function toSerializedObject() {
155 return get_object_vars($this);