1 | <?php |
||
14 | class ElggRelationship extends \ElggData implements |
||
15 | Importable // deprecated |
||
|
|||
16 | { |
||
17 | // database column limit |
||
18 | const RELATIONSHIP_LIMIT = 50; |
||
19 | |||
20 | /** |
||
21 | * Create a relationship object |
||
22 | * |
||
23 | * @param \stdClass $row Database row or null for new relationship |
||
24 | * @throws InvalidArgumentException |
||
25 | */ |
||
26 | public function __construct($row = null) { |
||
53 | |||
54 | /** |
||
55 | * (non-PHPdoc) |
||
56 | * |
||
57 | * @see \ElggData::initializeAttributes() |
||
58 | * |
||
59 | * @return void |
||
60 | */ |
||
61 | protected function initializeAttributes() { |
||
69 | |||
70 | /** |
||
71 | * Set an attribute of the relationship |
||
72 | * |
||
73 | * @param string $name Name |
||
74 | * @param mixed $value Value |
||
75 | * @return void |
||
76 | */ |
||
77 | 1 | public function __set($name, $value) { |
|
80 | |||
81 | /** |
||
82 | * Class member set overloading |
||
83 | * |
||
84 | * @param string $name Name |
||
85 | * @param mixed $value Value |
||
86 | * @return mixed |
||
87 | * @deprecated 1.9 |
||
88 | */ |
||
89 | public function set($name, $value) { |
||
94 | |||
95 | /** |
||
96 | * Get an attribute of the relationship |
||
97 | * |
||
98 | * @param string $name Name |
||
99 | * @return mixed |
||
100 | */ |
||
101 | 2 | public function __get($name) { |
|
108 | |||
109 | /** |
||
110 | * Class member get overloading |
||
111 | * |
||
112 | * @param string $name Name |
||
113 | * @return mixed |
||
114 | * @deprecated 1.9 |
||
115 | */ |
||
116 | public function get($name) { |
||
120 | |||
121 | /** |
||
122 | * Save the relationship |
||
123 | * |
||
124 | * @return int the relationship ID |
||
125 | * @throws IOException |
||
126 | */ |
||
127 | public function save() { |
||
144 | |||
145 | /** |
||
146 | * Delete this relationship from the database. |
||
147 | * |
||
148 | * @return bool |
||
149 | */ |
||
150 | public function delete() { |
||
153 | |||
154 | /** |
||
155 | * Get a URL for this relationship. |
||
156 | * |
||
157 | * Plugins can register for the 'relationship:url', 'relationship' plugin hook to |
||
158 | * customize the url for a relationship. |
||
159 | * |
||
160 | * @return string |
||
161 | */ |
||
162 | public function getURL() { |
||
193 | |||
194 | /** |
||
195 | * {@inheritdoc} |
||
196 | */ |
||
197 | public function toObject() { |
||
207 | |||
208 | // EXPORTABLE INTERFACE //////////////////////////////////////////////////////////// |
||
209 | |||
210 | /** |
||
211 | * Return an array of fields which can be exported. |
||
212 | * |
||
213 | * @return array |
||
214 | * @deprecated 1.9 Use toObject() |
||
215 | */ |
||
216 | public function getExportableValues() { |
||
225 | |||
226 | /** |
||
227 | * Export this relationship |
||
228 | * |
||
229 | * @return array |
||
230 | * @deprecated 1.9 Use toObject() |
||
231 | */ |
||
232 | public function export() { |
||
245 | |||
246 | // IMPORTABLE INTERFACE //////////////////////////////////////////////////////////// |
||
247 | |||
248 | /** |
||
249 | * Import a relationship |
||
250 | * |
||
251 | * @param ODD $data ODD data |
||
252 | |||
253 | * @return bool |
||
254 | * @throws ImportException|InvalidParameterException |
||
255 | * @deprecated 1.9 |
||
256 | */ |
||
257 | public function import(ODD $data) { |
||
293 | |||
294 | // SYSTEM LOG INTERFACE //////////////////////////////////////////////////////////// |
||
295 | |||
296 | /** |
||
297 | * Return an identification for the object for storage in the system log. |
||
298 | * This id must be an integer. |
||
299 | * |
||
300 | * @return int |
||
301 | */ |
||
302 | public function getSystemLogID() { |
||
305 | |||
306 | /** |
||
307 | * For a given ID, return the object associated with it. |
||
308 | * This is used by the river functionality primarily. |
||
309 | * This is useful for checking access permissions etc on objects. |
||
310 | * |
||
311 | * @param int $id ID |
||
312 | * |
||
313 | * @return \ElggRelationship |
||
314 | */ |
||
315 | public function getObjectFromID($id) { |
||
318 | |||
319 | /** |
||
320 | * Return a type of the object - eg. object, group, user, relationship, metadata, annotation etc |
||
321 | * |
||
322 | * @return string 'relationship' |
||
323 | */ |
||
324 | public function getType() { |
||
327 | |||
328 | /** |
||
329 | * Return a subtype. For metadata & annotations this is the 'name' and for relationship this |
||
330 | * is the relationship type. |
||
331 | * |
||
332 | * @return string |
||
333 | */ |
||
334 | public function getSubtype() { |
||
337 | } |
||
338 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.