◆ __construct()
◆ buildTokenURL()
ILIAS\FileDelivery\Services::buildTokenURL |
( |
FileStream |
$stream, |
|
|
string |
$filename, |
|
|
Disposition |
$disposition, |
|
|
int |
$user_id, |
|
|
int |
$valid_for_at_least_hours |
|
) |
| |
Definition at line 57 of file Services.php.
63 : URI {
64
65 $valid_for_at_least_hours++;
66 $until = new \DateTimeImmutable(
67 (new \DateTimeImmutable("now +$valid_for_at_least_hours hours"))->format('Y-m-d H:00')
68 );
69
70 $token = $this->data_signer->getSignedStreamToken(
71 $stream,
73 $disposition,
75 $until
76 );
77
78
79 $suffix = '';
80
82 if (isset($pathinfo['extension']) && $pathinfo['extension'] !== '') {
83 $suffix = '.' . $pathinfo['extension'];
84 }
85
86 return new URI(
88 );
89 }
◆ delivery()
ILIAS\FileDelivery\Services::delivery |
( |
| ) |
|
Definition at line 47 of file Services.php.
48 {
49 return $this->delivery;
50 }
◆ getBaseURI()
ILIAS\FileDelivery\Services::getBaseURI |
( |
| ) |
|
|
protected |
Definition at line 91 of file Services.php.
91 : string
92 {
93 return $this->base_uri ?? $this->base_uri = rtrim(
94 $this->
http->request()->getUri()->getScheme()
95 . '://' . $this->http->request()->getUri()->getHost()
96 . ($this->http->request()->getUri()->getPort() ? ':' . $this->http->request()->getUri()->getPort() : '')
97 . dirname($this->
http->request()->getUri()->getPath()),
98 "/"
99 );
100 }
static http()
Fetches the global http state from ILIAS.
References ILIAS\FileDelivery\http().
◆ legacyDelivery()
ILIAS\FileDelivery\Services::legacyDelivery |
( |
| ) |
|
Definition at line 52 of file Services.php.
53 {
54 return $this->legacy_delivery;
55 }
◆ $base_uri
string ILIAS\FileDelivery\Services::$base_uri = null |
|
private |
◆ DELIVERY_ENDPOINT
const ILIAS\FileDelivery\Services::DELIVERY_ENDPOINT = '/deliver.php/' |
The documentation for this class was generated from the following file: