public function createDestination(SiteDestinationContainer $parent, $name, Transport $transport)
 {
     if (trim($name) == "") {
         throw new e\CreationErrorException(S_SPAN . c\M::EMPTY_DESTINATION_NAME . E_SPAN);
     }
     $asset = AssetTemplate::getDestination();
     $asset->destination->name = $name;
     $asset->destination->parentContainerPath = $parent->getPath();
     $transport_path = $transport->getPath();
     $transport_site = $transport->getSiteName();
     // add site name if from Global
     if ($transport_site == NULL) {
         $transport_path = "Global:" . $transport_path;
     }
     $asset->destination->transportPath = $transport_path;
     $asset->destination->siteName = $parent->getSiteName();
     return $this->createAsset($asset, Destination::TYPE, $this->getPath($parent, $name), $parent->getSiteName());
 }
 public function setTransport(Transport $t)
 {
     if ($t == NULL) {
         throw new e\NullAssetException(S_SPAN . c\M::NULL_TRANSPORT . E_SPAN);
     }
     $this->getProperty()->transportId = $t->getId();
     $this->getProperty()->transportPath = $t->getPath();
     return $this;
 }