-
- function getTitle() { return $this->xmlEncode( $this->Title ); }
- function getUrl() { return $this->xmlEncode( $this->Url ); }
- function getDescription() { return $this->xmlEncode( $this->Description ); }
- function getLanguage() {
- global $wgContLanguageCode;
- return $wgContLanguageCode;
+
+ /**
+ * Get the unique id of this item
+ *
+ * @return String
+ */
+ public function getUniqueId() {
+ if ( $this->uniqueId ) {
+ return $this->xmlEncode( $this->uniqueId );
+ }
+ }
+
+ /**
+ * set the unique id of an item
+ *
+ * @param string $uniqueId unique id for the item
+ * @param $rssIsPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only)
+ */
+ public function setUniqueId( $uniqueId, $rssIsPermalink = false ) {
+ $this->uniqueId = $uniqueId;
+ $this->rssIsPermalink = $rssIsPermalink;
+ }
+
+ /**
+ * Get the title of this item; already xml-encoded
+ *
+ * @return String
+ */
+ public function getTitle() {
+ return $this->xmlEncode( $this->title );
+ }
+
+ /**
+ * Get the URL of this item; already xml-encoded
+ *
+ * @return String
+ */
+ public function getUrl() {
+ return $this->xmlEncode( $this->url );
+ }
+
+ /**
+ * Get the description of this item; already xml-encoded
+ *
+ * @return String
+ */
+ public function getDescription() {
+ return $this->xmlEncode( $this->description );
+ }
+
+ /**
+ * Get the language of this item
+ *
+ * @return String
+ */
+ public function getLanguage() {
+ global $wgLanguageCode;
+ return $wgLanguageCode;
+ }
+
+ /**
+ * Get the title of this item
+ *
+ * @return String
+ */
+ public function getDate() {
+ return $this->date;
+ }
+
+ /**
+ * Get the author of this item; already xml-encoded
+ *
+ * @return String
+ */
+ public function getAuthor() {
+ return $this->xmlEncode( $this->author );
+ }
+
+ /**
+ * Get the comment of this item; already xml-encoded
+ *
+ * @return String
+ */
+ public function getComments() {
+ return $this->xmlEncode( $this->comments );
+ }
+
+ /**
+ * Quickie hack... strip out wikilinks to more legible form from the comment.
+ *
+ * @param string $text wikitext
+ * @return String
+ */
+ public static function stripComment( $text ) {
+ return preg_replace( '/\[\[([^]]*\|)?([^]]+)\]\]/', '\2', $text );