+ /**
+ * Get the feed uri (http/https)
+ */
+ public function getUri()
+ {
+ if (empty($this->uri)) {
+ throw new NoUriException($this);
+ }
+ return $this->uri;
+ }
+
+ /**
+ * Do we have a hub? Then we are a PuSH feed.
+ * https://en.wikipedia.org/wiki/PubSubHubbub
+ *
+ * If huburi is empty, then doublecheck that we are not using
+ * a fallback hub. If there is a fallback hub, it is only if the
+ * sub_state is "nohub" that we assume it's not a PuSH feed.
+ */
+ public function isPuSH()
+ {
+ if (empty($this->huburi)
+ && (!common_config('feedsub', 'fallback_hub')
+ || $this->sub_state === 'nohub')) {
+ // Here we have no huburi set. Also, either there is no
+ // fallback hub configured or sub_state is "nohub".
+ return false;
+ }
+ return true;
+ }
+