You are here

public function Publisher::addHubUrl in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/PubSubHubbub/Publisher.php \Zend\Feed\PubSubHubbub\Publisher::addHubUrl()

Add a Hub Server URL supported by Publisher

Parameters

string $url:

Return value

Publisher

Throws

Exception\InvalidArgumentException

1 call to Publisher::addHubUrl()
Publisher::addHubUrls in vendor/zendframework/zend-feed/src/PubSubHubbub/Publisher.php
Add an array of Hub Server URLs supported by Publisher

File

vendor/zendframework/zend-feed/src/PubSubHubbub/Publisher.php, line 101

Class

Publisher

Namespace

Zend\Feed\PubSubHubbub

Code

public function addHubUrl($url) {
  if (empty($url) || !is_string($url) || !Uri::factory($url)
    ->isValid()) {
    throw new Exception\InvalidArgumentException('Invalid parameter "url"' . ' of "' . $url . '" must be a non-empty string and a valid' . 'URL');
  }
  $this->hubUrls[] = $url;
  return $this;
}