ILIAS  release_8 Revision v8.24
StreamOptions.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
6
7/******************************************************************************
8 *
9 * This file is part of ILIAS, a powerful learning management system.
10 *
11 * ILIAS is licensed with the GPL-3.0, you should have received a copy
12 * of said license along with the source code.
13 *
14 * If this is not the case or you just want to try ILIAS, you'll find
15 * us at:
16 * https://www.ilias.de
17 * https://github.com/ILIAS-eLearning
18 *
19 *****************************************************************************/
33final class StreamOptions
34{
35 public const UNKNOWN_STREAM_SIZE = -1;
36
37 private int $size;
41 private array $metadata;
42
43
50 public function __construct(array $metadata = [], int $size = self::UNKNOWN_STREAM_SIZE)
51 {
52 $this->size = $size;
53 $this->metadata = $metadata;
54 }
55
56
60 public function getSize(): int
61 {
62 return $this->size;
63 }
64
65
69 public function getMetadata(): array
70 {
71 return $this->metadata;
72 }
73}
__construct(array $metadata=[], int $size=self::UNKNOWN_STREAM_SIZE)
StreamOptions constructor.