/**
  * {@inheritdoc}
  * @throws InvalidArgumentException if the resource ID format is invalid
  */
 public function setResourceId($resourceId)
 {
     if (!strpos($resourceId, '/')) {
         throw new InvalidArgumentException('The resource ID must be in the form of DistributionId/InvalidationId');
     }
     return parent::setResourceId($resourceId);
 }
 /**
  * {@inheritdoc}
  * @throws InvalidArgumentException if the resource ID format is invalid
  */
 public function setResourceId($resourceId)
 {
     if (!strpos($resourceId, '/')) {
         throw new InvalidArgumentException('The resource ID must be in the form of bucket/key');
     }
     parent::setResourceId($resourceId);
     return $this;
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function setConfig(array $config)
 {
     foreach ($config as $key => $value) {
         if (substr($key, 0, 7) == 'waiter.') {
             $this->waiterConfig->set(substr($key, 7), $value);
         }
     }
     if (!isset($config[self::INTERVAL])) {
         $config[self::INTERVAL] = $this->waiterConfig->get(WaiterConfig::INTERVAL);
     }
     if (!isset($config[self::MAX_ATTEMPTS])) {
         $config[self::MAX_ATTEMPTS] = $this->waiterConfig->get(WaiterConfig::MAX_ATTEMPTS);
     }
     return parent::setConfig($config);
 }