getPeer()); return sprintf("/%s/%s/%d", urlencode(strtolower($class::OM_CLASS)), urlencode($this->getName()), $this->getId()); } function getLink($blurb = null, $url = null, $classes = null) { if (is_null($classes)) $classes = array(); else if (! is_array($classes)) $classes = array($classes); return sprintf("%s", (count($classes)) ? " class=\"" . join(" ", $classes) . "\"" : "", (isset($url)) ? $url : $this->getURL(), (isset($blurb)) ? htmlspecialchars($blurb) : htmlspecialchars($this->getName())); } function getStrongLink($blurb = null, $url = null) { return $this->getLink($blurb, $url, "strong"); } function getActionLink($action, $blurb, $classes = null) { if (is_null($classes)) $classes = array(); else if (! is_array($classes)) $classes = array($classes); return $this->getLink($blurb, sprintf("%s/%s", $this->getURL(), urlencode($action)), array_unique(array_merge($classes, array("small")))); } function getDeleteLink() { return $this->getActionLink("delete", "Delete", "delete"); } } ?>