1 | <?php |
||
14 | class Unit implements UnitInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var int |
||
18 | * |
||
19 | * @ORM\Column(name="id", type="integer") |
||
20 | * @ORM\Id |
||
21 | * @ORM\GeneratedValue(strategy="AUTO") |
||
22 | */ |
||
23 | private $id; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | * |
||
28 | * @ORM\Column(name="name", type="string", length=64) |
||
29 | */ |
||
30 | private $name; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | * |
||
35 | * @ORM\Column(name="shortcut", type="string", length=3) |
||
36 | */ |
||
37 | private $shortcut; |
||
38 | |||
39 | /** |
||
40 | * Unit constructor. |
||
41 | * |
||
42 | * @param string $name |
||
43 | * @param string $shortcut |
||
44 | */ |
||
45 | public function __construct($name, $shortcut) |
||
50 | |||
51 | /** |
||
52 | * Get id |
||
53 | * |
||
54 | * @return integer |
||
55 | */ |
||
56 | public function getId() |
||
60 | |||
61 | /** |
||
62 | * Set name |
||
63 | * |
||
64 | * @param string $name |
||
65 | * @return Unit |
||
66 | */ |
||
67 | public function setName($name) |
||
73 | |||
74 | /** |
||
75 | * Get name |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getName() |
||
83 | |||
84 | /** |
||
85 | * Set shortcut |
||
86 | * |
||
87 | * @param string $shortcut |
||
88 | * @return Unit |
||
89 | */ |
||
90 | public function setShortcut($shortcut) |
||
96 | |||
97 | /** |
||
98 | * Get shortcut |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getShortcut() |
||
106 | |||
107 | /** |
||
108 | * @param string $name |
||
109 | * @param string $shortcut |
||
110 | * @return void |
||
111 | */ |
||
112 | public function compose($name, $shortcut) |
||
117 | } |
||
118 |