public function AbstractFeed::addHub in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-feed/src/Writer/AbstractFeed.php \Zend\Feed\Writer\AbstractFeed::addHub()
Add a Pubsubhubbub hub endpoint URL
Parameters
string $url:
Return value
Throws
Exception\InvalidArgumentException
1 call to AbstractFeed::addHub()
- AbstractFeed::addHubs in vendor/
zendframework/ zend-feed/ src/ Writer/ AbstractFeed.php - Add Pubsubhubbub hub endpoint URLs
File
- vendor/
zendframework/ zend-feed/ src/ Writer/ AbstractFeed.php, line 447
Class
Namespace
Zend\Feed\WriterCode
public function addHub($url) {
if (empty($url) || !is_string($url) || !Uri::factory($url)
->isValid()) {
throw new Exception\InvalidArgumentException('Invalid parameter: "url" array value' . ' must be a non-empty string and valid URI/IRI');
}
if (!isset($this->data['hubs'])) {
$this->data['hubs'] = [];
}
$this->data['hubs'][] = $url;
return $this;
}