1 | <?php |
||
9 | class Relation |
||
10 | { |
||
11 | const MANY_TO_ONE = 'ManyToOne'; |
||
12 | const ONE_TO_MANY = 'OneToMany'; |
||
13 | |||
14 | /** |
||
15 | * key |
||
16 | * |
||
17 | * @var string |
||
18 | * @access private |
||
19 | */ |
||
20 | private $serializedKey; |
||
21 | |||
22 | /** |
||
23 | * type |
||
24 | * |
||
25 | * @var string |
||
26 | * @access private |
||
27 | */ |
||
28 | private $type; |
||
29 | |||
30 | /** |
||
31 | * targetEntity |
||
32 | * |
||
33 | * @var string |
||
34 | * @access private |
||
35 | */ |
||
36 | private $targetEntity; |
||
37 | |||
38 | /** |
||
39 | * __construct |
||
40 | * |
||
41 | * @param string $serializedKey |
||
42 | * @param string $type |
||
43 | * @access public |
||
44 | */ |
||
45 | public function __construct($serializedKey, $type, $targetEntity) |
||
51 | |||
52 | /** |
||
53 | * Getter for serializedKey |
||
54 | * |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getSerializedKey() |
||
61 | |||
62 | /** |
||
63 | * Setter for serializedKey |
||
64 | * |
||
65 | * @param string $serializedKey |
||
66 | * @return Relation |
||
67 | */ |
||
68 | public function setSerializedKey($serializedKey) |
||
74 | |||
75 | /** |
||
76 | * Getter for type |
||
77 | * |
||
78 | * return string |
||
79 | */ |
||
80 | public function getType() |
||
84 | |||
85 | /** |
||
86 | * Setter for type |
||
87 | * |
||
88 | * @param string $type |
||
89 | * @return Relation |
||
90 | */ |
||
91 | public function setType($type) |
||
96 | |||
97 | /** |
||
98 | * isOneToMany |
||
99 | * |
||
100 | * @access public |
||
101 | * @return boolean |
||
102 | */ |
||
103 | public function isOneToMany() |
||
107 | |||
108 | /** |
||
109 | * isManyToOne |
||
110 | * |
||
111 | * @access public |
||
112 | * @return boolean |
||
113 | */ |
||
114 | public function isManyToOne() |
||
118 | |||
119 | /** |
||
120 | * Getter for targetEntity |
||
121 | * |
||
122 | * return string |
||
123 | */ |
||
124 | public function getTargetEntity() |
||
128 | |||
129 | /** |
||
130 | * Setter for targetEntity |
||
131 | * |
||
132 | * @param string $targetEntity |
||
133 | * @return Relation |
||
134 | */ |
||
135 | public function setTargetEntity($targetEntity) |
||
140 | } |
||
141 |