private function packageAppFiles($app)
    {
        $appName = $app->name;
        $zipFileName = $this->zipFilePath;
        $storageServiceId = $app->storage_service_id;
        $storageFolder = $app->storage_container;

        if (empty($storageServiceId)) {
            $storageServiceId = $this->getDefaultStorageServiceId();
        }

        if (empty($storageServiceId)) {
            throw new InternalServerErrorException("Can not find storage service identifier.");
        }

        /** @type FileServiceInterface $storage */
        $storage = ServiceManager::getServiceById($storageServiceId);
        if (!$storage) {
            throw new InternalServerErrorException("Can not find storage service by identifier '$storageServiceId''.");
        }

        if ($storage->folderExists($storageFolder)) {
            $storage->getFolderAsZip($storageFolder, $this->zip, $zipFileName, true);
        }

        return true;
    }
private function packageAppFiles($app)
    {
        $appName = $app->name;
        $zipFileName = $this->zipFilePath;
        $storageServiceId = $app->storage_service_id;
        $storageFolder = $app->storage_container;

        if (empty($storageServiceId)) {
            $storageServiceId = $this->getDefaultStorageServiceId();
        }

        if (empty($storageServiceId)) {
            throw new InternalServerErrorException("Can not find storage service identifier.");
        }

        /** @type FileServiceInterface $storage */
        $storage = ServiceManager::getServiceById($storageServiceId);
        if (!$storage) {
            throw new InternalServerErrorException("Can not find storage service by identifier '$storageServiceId''.");
        }

        if ($storage->folderExists($storageFolder)) {
            $storage->getFolderAsZip($storageFolder, $this->zip, $zipFileName, true);
        }

        return true;
    }
private function packageAppFiles ( $ app ) { $ appName = $ app -> name ; $ zipFileName = $ this -> zipFilePath ; $ storageServiceId = $ app -> storage_service_id ; $ storageFolder = $ app -> storage_container ; if ( empty ( $ storageServiceId ) ) { $ storageServiceId = $ this -> getDefaultStorageServiceId ( ) ; } if ( empty ( $ storageServiceId ) ) { throw new InternalServerErrorException ( "Can not find storage service identifier." ) ; } /** @type FileServiceInterface $storage */ $ storage = ServiceManager :: getServiceById ( $ storageServiceId ) ; if ( ! $ storage ) { throw new InternalServerErrorException ( "Can not find storage service by identifier '$storageServiceId''." ) ; } if ( $ storage -> folderExists ( $ storageFolder ) ) { $ storage -> getFolderAsZip ( $ storageFolder , $ this -> zip , $ zipFileName , true ) ; } return true ; }
Package app files for export.

@param $app

@return bool
@throws \DreamFactory\Core\Exceptions\ForbiddenException
@throws \DreamFactory\Core\Exceptions\InternalServerErrorException
@throws \DreamFactory\Core\Exceptions\NotFoundException
Package app files for export .