public function publishSubscribers(Destination $destination = NULL) { $subscriber_ids = $this->getSubscribers(); if (isset($destination)) { $destination_std = new \stdClass(); $destination_std->id = $destination->getId(); $destination_std->type = $destination->getType(); } if (isset($subscriber_ids)) { foreach ($subscriber_ids as $subscriber_id) { if (self::DEBUG) { u\DebugUtility::out("Publishing " . $subscriber_id->getId()); } $this->getService()->publish($subscriber_id->toStdClass(), $destination_std); } } return $this; }
public function publish(Destination $destination = NULL) { if (isset($destination)) { $destination_std = new \stdClass(); $destination_std->id = $destination->getId(); $destination_std->type = $destination->getType(); } if ($this->getProperty()->shouldBePublished) { $service = $this->getService(); if (isset($destination)) { $service->publish($service->createId($this->getType(), $this->getId()), $destination_std); } else { $service->publish($service->createId($this->getType(), $this->getId())); } } return $this; }
public function publish(Destination $destination = NULL) { if (isset($destination)) { $destination_std = new \stdClass(); $destination_std->id = $destination->getId(); $destination_std->type = $destination->getType(); } $service = $this->getService(); if (isset($destination)) { $service->publish($service->createId(self::TYPE, $this->getProperty()->id), $destination_std); } else { $service->publish($service->createId(self::TYPE, $this->getProperty()->id)); } return $this; }