5 * Copyright (C) 2016 Matthew Vita <matthewvita48@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>;.
19 * @author Matthew Vita <matthewvita48@gmail.com>
20 * @link http://www.open-emr.org
23 namespace OpenEMR\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
;
31 * @Table(name="version")
32 * @Entity(repositoryClass="OpenEMR\Repositories\VersionRepository")
37 * Default constructor.
39 public function __construct()
44 * @Column(name="v_major", type="integer", length=11, nullable=false, options={"default" : 0})
49 * @Column(name="v_minor", type="integer", length=11, nullable=false, options={"default" : 0}))
54 * @Column(name="v_patch", type="integer", length=11, nullable=false, options={"default" : 0}))
59 * @Column(name="v_realpatch", type="integer", length=11, nullable=false, options={"default" : 0}))
64 * @Column(name="v_tag", type="string", length=31, nullable=false, options={"default" : ""}))
70 * @Column(name="v_database", type="integer", length=11, nullable=false, options={"default" : 0}))
75 * @Column(name="v_acl", type="integer", length=11, nullable=false, options={"default" : 0}))
84 public function getMajor()
94 public function setMajor($value)
96 $this->major
= $value;
102 * return minor number
104 public function getMinor()
112 * @param minor number
114 public function setMinor($value)
116 $this->minor
= $value;
122 * @return patch number
124 public function getPatch()
132 * @param patch number
134 public function setPatch($value)
136 $this->patch
= $value;
140 * Getter for real patch.
142 * @return real patch number
144 public function getRealPatch()
146 return $this->realPatch
;
150 * Setter for real patch.
152 * @param real patch number
154 public function setRealPatch($value)
156 $this->realPatch
= $value;
164 public function getTag()
174 public function setTag($value)
180 * Getter for database.
182 * @return database number
184 public function getDatabase()
186 return $this->database
;
190 * Setter for database.
192 * @param database number
194 public function setDatabase($value)
196 $this->database
= $value;
204 public function getAcl()
214 public function setAcl($value)
220 * ToString of the entire object.
222 * @return object as string
224 public function __toString()
226 return "acl: '" . $this->getAcl() . "' " .
227 "database: '" . $this->getDatabase() . "' " .
228 "tag: '" . $this->getTag() . "' " .
229 "realPatch: '" . $this->getRealPatch() . "' " .
230 "patch: '" . $this->getPatch() . "' " .
231 "minor: '" . $this->getMinor() . "' " .
232 "major: '" . $this->getMajor() . "'";
236 * ToSerializedObject of the entire object.
238 * @return object as serialized object.
240 public function toSerializedObject()
242 return get_object_vars($this);