19 declare(strict_types=1);
57 return $this->consumer_factory->download($this->resource_builder->get($identification));
62 return $this->consumer_factory->inline($this->resource_builder->get($identification));
67 return $this->consumer_factory->fileStream($this->resource_builder->get($identification));
72 return $this->consumer_factory->src($this->resource_builder->get($identification),
$this->src_builder);
77 ?
string $zip_filename = null
80 iterator_to_array($this->collection_builder->getResourceIds($identification)),
86 array $identifications,
87 ?
string $zip_filename = null
90 foreach ($identifications as $rid) {
92 throw new \InvalidArgumentException(
'Expected ResourceIdentification');
94 $resources[] = $this->resource_builder->get($rid);
97 return $this->consumer_factory->downloadMultiple(
download(ResourceIdentification $identification)
ConsumerFactory $consumer_factory
Class ResourceCollectionIdentification.
CollectionBuilder $collection_builder
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
downloadResources(array $identifications, ?string $zip_filename=null)
ResourceBuilder $resource_builder
Class ResourceIdentification.
__construct(ConsumerFactory $consumer_factory, ResourceBuilder $resource_builder, CollectionBuilder $collection_builder, ?SrcBuilder $src_builder=null)
Consumers constructor.
src(ResourceIdentification $identification)
downloadCollection(ResourceCollectionIdentification $identification, ?string $zip_filename=null)
stream(ResourceIdentification $identification)