예제 #1
0
 function __construct($indent = true)
 {
     parent::__construct($indent);
     // Feeds containing notice info use these namespaces
     $this->addNamespace('thr', 'http://purl.org/syndication/thread/1.0');
     $this->addNamespace('georss', 'http://www.georss.org/georss');
     $this->addNamespace('activity', 'http://activitystrea.ms/spec/1.0/');
     $this->addNamespace('media', 'http://purl.org/syndication/atommedia');
     $this->addNamespace('poco', 'http://portablecontacts.net/spec/1.0');
     // XXX: What should the uri be?
     $this->addNamespace('ostatus', 'http://ostatus.org/schema/1.0');
 }
예제 #2
0
 /**
  * Constructor - adds a bunch of XML namespaces we need in our
  * notice-specific Atom feeds, and allows setting the current
  * authenticated user (useful for API methods).
  *
  * @param User    $cur     the current authenticated user (optional)
  * @param boolean $indent  Whether to indent XML output
  *
  */
 function __construct($cur = null, $indent = true)
 {
     parent::__construct($indent);
     $this->cur = $cur ?: common_current_user();
     $this->scoped = !is_null($this->cur) ? $this->cur->getProfile() : null;
     // Feeds containing notice info use these namespaces
     $this->addNamespace('thr', 'http://purl.org/syndication/thread/1.0');
     $this->addNamespace('georss', 'http://www.georss.org/georss');
     $this->addNamespace('activity', 'http://activitystrea.ms/spec/1.0/');
     $this->addNamespace('media', 'http://purl.org/syndication/atommedia');
     $this->addNamespace('poco', 'http://portablecontacts.net/spec/1.0');
     // XXX: What should the uri be?
     $this->addNamespace('ostatus', 'http://ostatus.org/schema/1.0');
     $this->addNamespace('statusnet', 'http://status.net/schema/api/1/');
 }