Пример #1
0
 /**
  * Derives the delivery profile dynamic attributes from the file sync and the flavor asset.
  * @param FileSync $fileSync
  * @param flavorAsset $flavorAsset
  */
 public function initDeliveryDynamicAttributes(FileSync $fileSync = null, flavorAsset $flavorAsset = null)
 {
     if ($flavorAsset) {
         $this->params->setContainerFormat($flavorAsset->getContainerFormat());
     }
     if ($flavorAsset && $flavorAsset->getFileExt() !== null) {
         // if the extension is missing use the one from the actual path
         $this->params->setFileExtension($flavorAsset->getFileExt());
     } else {
         if ($fileSync) {
             $this->params->setFileExtension(pathinfo($fileSync->getFilePath(), PATHINFO_EXTENSION));
         }
     }
 }