13 private $attributes = array();
33 return $this->attributes;
56 if (isset($this->attributes[
$key])) {
57 return $this->attributes[
$key];
91 $this->attributes[
'published'] = date(
"r", $time);
100 return strtotime($this->attributes[
'published']);
118 foreach ($this->attributes as $k => $v) {
119 $attr .= ($v !=
"") ?
"$k=\"$v\" " :
"";
127 $end =
"><![CDATA[$body]]></{$tag}>";
130 return "<{$tag} $attr" . $end .
"\n";
getTagName()
For serialisation, implement to return a string name of the tag eg "header" or "metadata".
getBody()
Gets the body of the ODD.
__construct()
Construct an ODD document with initial values.
getPublishedAsTime()
Return the published time as a unix timestamp.
setBody($value)
Sets the body of the ODD.
getAttributes()
Returns an array of attributes.
getAttribute($key)
Returns an attribute.
__toString()
Magic function to generate valid ODD XML for this item.
setPublished($time)
Set the published time.
setAttribute($key, $value)
Sets an attribute.