More doc comments on MicroApp stuff; some of the show-notice code & the ActivityStreams stuff is a bit wonky and may need smoothing out

This commit is contained in:
Brion Vibber 2011-03-07 15:15:21 -08:00
parent 4a54bb337a
commit 541613ce69
3 changed files with 19 additions and 1 deletions

View File

@ -613,6 +613,8 @@ class ActivityObject
$this->poco->outputTo($xo);
}
// @fixme there's no way here to make a tree; elements can only contain plaintext
// @fixme these may collide with JSON extensions
foreach ($this->extra as $el) {
list($extraTag, $attrs, $content) = $el;
$xo->element($extraTag, $attrs, $content);
@ -697,6 +699,7 @@ class ActivityObject
//
// We can probably use the whole schema URL here but probably the
// relative simple name is easier to parse
// @fixme this breaks extension URIs
$object['type'] = substr($this->type, strrpos($this->type, '/') + 1);
// summary
@ -708,7 +711,9 @@ class ActivityObject
$object['url'] = $this->id;
/* Extensions */
// @fixme these may collide with XML extensions
// @fixme multiple tags of same name will overwrite each other
// @fixme text content from XML extensions will be lost
foreach ($this->extra as $e) {
list($objectName, $props, $txt) = $e;
$object[$objectName] = $props;

View File

@ -146,6 +146,10 @@ abstract class MicroAppPlugin extends Plugin
*
* @param Notice $notice
* @param HTMLOutputter $out
*
* @fixme WARNING WARNING WARNING base plugin stuff below tries to close
* a div that this function opens in the BookmarkPlugin child class.
* This is probably wrong.
*/
abstract function showNotice($notice, $out);
@ -232,6 +236,8 @@ abstract class MicroAppPlugin extends Plugin
* @param NoticeListItem $nli The list item being shown.
*
* @return boolean hook value
*
* @fixme WARNING WARNING WARNING this closes a 'div' that is implicitly opened in BookmarkPlugin's showNotice implementation
*/
function onStartShowNoticeItem($nli)

View File

@ -508,6 +508,13 @@ class BookmarkPlugin extends MicroAppPlugin
return $object;
}
/**
* @fixme WARNING WARNING WARNING this opens a 'div' that is apparently closed by MicroAppPlugin
* @fixme that's probably wrong?
*
* @param Notice $notice
* @param HTMLOutputter $out
*/
function showNotice($notice, $out)
{
$nb = Bookmark::getByNotice($notice);