ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\FileDelivery\EntryPoint Class Reference
+ Inheritance diagram for ILIAS\FileDelivery\EntryPoint:
+ Collaboration diagram for ILIAS\FileDelivery\EntryPoint:

Public Member Functions

 __construct (private FileDeliveryServices $file_delivery, private GlobalHttpState $http_state)
 
 getName ()
 
 enter ()
 Pass program execution to this entry point. More...
 
 getName ()
 
 enter ()
 Pass program execution to this entry point. More...
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 29 of file EntryPoint.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\FileDelivery\EntryPoint::__construct ( private FileDeliveryServices  $file_delivery,
private GlobalHttpState  $http_state 
)

Definition at line 31 of file EntryPoint.php.

34 {
35 }

Member Function Documentation

◆ enter()

ILIAS\FileDelivery\EntryPoint::enter ( )

Pass program execution to this entry point.

Returns
int 0 if everthing went fine, or an error-code.

Implements ILIAS\Component\EntryPoint.

Definition at line 42 of file EntryPoint.php.

42 : int
43 {
44 $requested_url = (string) $this->http_state->request()->getUri();
45 $access_token = substr(
46 $requested_url,
47 strpos($requested_url, Services::DELIVERY_ENDPOINT) + strlen(Services::DELIVERY_ENDPOINT)
48 );
49
50 $this->file_delivery->delivery()->deliverFromToken($access_token);
51
52 return 0;
53 }

References ILIAS\FileDelivery\Services\DELIVERY_ENDPOINT.

◆ getName()

ILIAS\FileDelivery\EntryPoint::getName ( )

Implements ILIAS\Component\EntryPoint.

Definition at line 37 of file EntryPoint.php.

37 : string
38 {
39 return FileDelivery::class;
40 }

The documentation for this class was generated from the following file: