public function setDestination(Destination $d) { if ($this->getPropertyName() != c\P::TWITTERCONNECTOR && $this->getPropertyName() != c\P::FACEBOOKCONNECTOR) { throw new \Exception(S_SPAN . "The setDestination method cannot be called by a " . $this->getPropertyName() . " object." . E_SPAN); } $this->getProperty()->destinationId = $d->getId(); $this->getProperty()->destinationPath = $d->getName(); return $this; }