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:
parent
4dcaa98c20
commit
980a0dbdf1
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user