ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
◀ ilDoc Overview
BundledRequestBuilder.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\StaticURL\Request
;
22
23
use
ILIAS\HTTP\Services
;
24
use
ILIAS\Refinery\Factory
;
25
29
class
BundledRequestBuilder
implements
RequestBuilder
30
{
31
private
LegacyRequestBuilder
$legacy
;
32
private
StaticURLRequestBuilder
$static
;
33
private
ShortlinkRequestBuilder
$shortlink
;
34
35
public
function
__construct
()
36
{
37
$this->
legacy
=
new
LegacyRequestBuilder
();
38
$this->
static
=
new
StaticURLRequestBuilder
();
39
$this->shortlink =
new
ShortlinkRequestBuilder
();
40
}
41
42
public
function
buildRequest
(
Services
$http
,
Factory
$refinery
, array $handlers): ?
Request
43
{
44
if
(($request = $this->shortlink->buildRequest(
45
$http
,
46
$refinery
,
47
$handlers
48
)) instanceof
Request
) {
49
return
$request;
50
}
51
52
if
(($request = $this->
legacy
->buildRequest(
53
$http,
54
$refinery
,
55
$handlers
56
)) instanceof
Request
) {
57
// we have now the situation that a new static URL is requested, but the handler is not yet registered or implemented
58
// we built a legacy request using the LegacyRequestBuilder for this to let the old system handle it.
59
return
$request;
60
}
61
62
return
$this->
static
->buildRequest($http,
$refinery
, $handlers);
63
}
64
65
}
ILIAS\Data\Factory
Builds data types.
Definition:
Factory.php:36
ILIAS\HTTP\Services
Class Services.
Definition:
Services.php:38
ILIAS\Refinery\Factory
Definition:
Factory.php:26
ILIAS\StaticURL\Request\BundledRequestBuilder
Definition:
BundledRequestBuilder.php:30
ILIAS\StaticURL\Request\BundledRequestBuilder\$shortlink
ShortlinkRequestBuilder $shortlink
Definition:
BundledRequestBuilder.php:33
ILIAS\StaticURL\Request\BundledRequestBuilder\__construct
__construct()
Definition:
BundledRequestBuilder.php:35
ILIAS\StaticURL\Request\BundledRequestBuilder\buildRequest
buildRequest(Services $http, Factory $refinery, array $handlers)
Definition:
BundledRequestBuilder.php:42
ILIAS\StaticURL\Request\BundledRequestBuilder\$static
StaticURLRequestBuilder $static
Definition:
BundledRequestBuilder.php:32
ILIAS\StaticURL\Request\BundledRequestBuilder\$legacy
LegacyRequestBuilder $legacy
Definition:
BundledRequestBuilder.php:31
ILIAS\StaticURL\Request\LegacyRequestBuilder
Definition:
LegacyRequestBuilder.php:33
ILIAS\StaticURL\Request\Request
Definition:
Request.php:29
ILIAS\StaticURL\Request\ShortlinkRequestBuilder
Definition:
ShortlinkRequestBuilder.php:32
ILIAS\StaticURL\Request\StaticURLRequestBuilder
Definition:
StaticURLRequestBuilder.php:31
$http
$http
Definition:
deliver.php:30
ILIAS\StaticURL\Request\RequestBuilder
Definition:
RequestBuilder.php:30
ILIAS\StaticURL\Request
Definition:
BundledRequestBuilder.php:21
ILIAS\UI\examples\Layout\Page\Mail\$refinery
$refinery
Definition:
base.php:57
ILIAS\UI\examples\MainControls\Slate\Legacy\legacy
legacy()
Definition:
legacy.php:29
components
ILIAS
StaticURL
src
Request
BundledRequestBuilder.php
Generated on Sat Dec 13 2025 23:03:39 for ILIAS by
1.9.4 (using
Doxyfile
)