You are here

public function Subscriber::addHubUrl in Zircon Profile 8

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

Add a Hub Server URL supported by Publisher

Parameters

string $url:

Return value

Subscriber

Throws

Exception\InvalidArgumentException

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

File

vendor/zendframework/zend-feed/src/PubSubHubbub/Subscriber.php, line 327

Class

Subscriber

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;
}