blob: 36db8a692d79fa31d69db1b977c49313883f20bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
<?php
/**
* Interface that provides an interface which must be implemented by all objects wishing to be
* recorded in the system log (and by extension the river).
*
* This interface defines a set of methods that permit the system log functions to
* hook in and retrieve the necessary information and to identify what events can
* actually be logged.
*
* To have events involving your object to be logged simply implement this interface.
*
* @package Elgg.Core
* @subpackage DataModel.Loggable
*/
interface Loggable {
/**
* Return an identification for the object for storage in the system log.
* This id must be an integer.
*
* @return int
*/
public function getSystemLogID();
/**
* Return the class name of the object.
* Added as a function because get_class causes errors for some reason.
*
* @return string
*/
public function getClassName();
/**
* Return the type of the object - eg. object, group, user, relationship, metadata, annotation etc
*
* @return string
*/
public function getType();
/**
* Return a subtype. For metadata & annotations this is the 'name' and for relationship this is the
* relationship type.
*
* @return string
*/
public function getSubtype();
/**
* For a given ID, return the object associated with it.
* This is used by the river functionality primarily.
* This is useful for checking access permissions etc on objects.
*
* @param int $id GUID of an entity
*
* @return ElggEntity
*/
public function getObjectFromID($id);
/**
* Return the GUID of the owner of this object.
*
* @return int
* @deprecated 1.8 Use getOwner() instead
*/
public function getObjectOwnerGUID();
}
|