PHP Интерфейс Loggable, Elgg

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.
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
getObjectFromID ( integer $id ) : ElggEntity For a given ID, return the object associated with it.
getSubtype ( ) : string Return a subtype. For metadata & annotations this is the 'name' and for relationship this is the relationship type.
getSystemLogID ( ) : integer Return an identification for the object for storage in the system log.
getType ( ) : string Return the type of the object - eg. object, group, user, relationship, metadata, annotation etc

Описание методов

getObjectFromID() публичный Метод

This is used by the river functionality primarily. This is useful for checking access permissions etc on objects.
public getObjectFromID ( integer $id ) : ElggEntity
$id integer GUID of an entity
Результат ElggEntity

getSubtype() публичный Метод

Return a subtype. For metadata & annotations this is the 'name' and for relationship this is the relationship type.
public getSubtype ( ) : string
Результат string

getSystemLogID() публичный Метод

This id must be an integer.
public getSystemLogID ( ) : integer
Результат integer

getType() публичный Метод

Return the type of the object - eg. object, group, user, relationship, metadata, annotation etc
public getType ( ) : string
Результат string