Add functions to avoid direct variable access
This commit is contained in:
parent
a1b0d5fa7e
commit
779ce40ac3
|
@ -97,6 +97,28 @@ class FeedSub extends Managed_DataObject
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the feed uri (http/https)
|
||||
*/
|
||||
public function getUri()
|
||||
{
|
||||
if (empty($this->uri)) {
|
||||
throw new ServerException('No URI for FeedSub entry');
|
||||
}
|
||||
return $this->uri;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do we have a hub? Then we are a PuSH feed.
|
||||
* https://en.wikipedia.org/wiki/PubSubHubbub
|
||||
*
|
||||
* NOTE: does not respect if we have a fallback_hub configured
|
||||
*/
|
||||
public function isPuSH()
|
||||
{
|
||||
return !empty($this->huburi);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the StatusNet-side profile for this feed
|
||||
* @return Profile
|
||||
|
|
Loading…
Reference in New Issue
Block a user