|
Revision 269, 1.3 kB
(checked in by ben, 3 years ago)
|
--
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
Class ElggObject |
|---|
| 3 |
{ |
|---|
| 4 |
var $ident; |
|---|
| 5 |
var $owner; |
|---|
| 6 |
var $_tag_uri; |
|---|
| 7 |
|
|---|
| 8 |
function ElggObject() |
|---|
| 9 |
{ |
|---|
| 10 |
} |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
* Get the object's id |
|---|
| 14 |
* |
|---|
| 15 |
* @return int The object id. |
|---|
| 16 |
*/ |
|---|
| 17 |
function getIdent() |
|---|
| 18 |
{ |
|---|
| 19 |
return $this->ident; |
|---|
| 20 |
} |
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
* Get the object's owner id |
|---|
| 24 |
* |
|---|
| 25 |
* @return int The owner id |
|---|
| 26 |
*/ |
|---|
| 27 |
function getOwner() |
|---|
| 28 |
{ |
|---|
| 29 |
return $this->getOwner(); |
|---|
| 30 |
} |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
* Get the object's tag URI |
|---|
| 34 |
* |
|---|
| 35 |
* @return string The object's tag URI |
|---|
| 36 |
*/ |
|---|
| 37 |
function getTagUri() |
|---|
| 38 |
{ |
|---|
| 39 |
if (!isset($this->user_username) || $this->user_username == "") |
|---|
| 40 |
{ |
|---|
| 41 |
if ($this->owner == -1) |
|---|
| 42 |
{ |
|---|
| 43 |
$user = new User($this->ident); |
|---|
| 44 |
} |
|---|
| 45 |
else |
|---|
| 46 |
{ |
|---|
| 47 |
$user = new User($this->owner); |
|---|
| 48 |
} |
|---|
| 49 |
|
|---|
| 50 |
$this->user_username = $user->getUserName(); |
|---|
| 51 |
} |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
$url = parse_url(url); |
|---|
| 56 |
|
|---|
| 57 |
$this->_tag_uri = "tag:".$this->user_username."@".$url['host'].",2005:".$this->type.":".$this->ident; |
|---|
| 58 |
|
|---|
| 59 |
return $this->_tag_uri; |
|---|
| 60 |
} |
|---|
| 61 |
} |
|---|
| 62 |
?> |
|---|
| 63 |
|
|---|