1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

Add getETag to Contact (PHP)

This commit is contained in:
Thomas Tanghus 2013-05-09 05:56:32 +02:00
parent 4dcaa98c20
commit 980a0dbdf1

View File

@ -160,6 +160,15 @@ class Contact extends VObject\VCard implements IPIMObject {
return isset($this->props['uri']) ? $this->props['uri'] : null;
}
/**
* @return string|null
* TODO: Cache result.
*/
public function getETag() {
$this->retrieve();
return md5($this->serialize());
}
/**
* If this object is part of a collection return a reference
* to the parent object, otherwise return null.