ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
GuzzleHttp\Client\CallbackHandler Class Reference
+ Collaboration diagram for GuzzleHttp\Client\CallbackHandler:

Public Member Functions

 __construct ()
 
 run ()
 

Data Fields

const KEY_ITEM = 'item'
 

Protected Attributes

WrapperFactory $wrapper
 
Factory $refinery
 
ilCtrlInterface $ctrl
 
Services $global_screen
 

Private Member Functions

 resolveCallback (isToolItem $item)
 
 getIdentification ()
 

Private Attributes

const TARGET_SCRIPT = "/ilias.php"
 

Detailed Description

Definition at line 30 of file CallbackHandler.php.

Constructor & Destructor Documentation

◆ __construct()

GuzzleHttp\Client\CallbackHandler::__construct ( )

Definition at line 45 of file CallbackHandler.php.

References $DIC, ILIAS\Repository\ctrl(), and ILIAS\Repository\refinery().

46  {
47  global $DIC;
48  $this->ctrl = $DIC->ctrl();
49  $this->wrapper = $DIC->http()->wrapper();
50  $this->refinery = $DIC->refinery();
51  $this->global_screen = $DIC->globalScreen();
52  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ getIdentification()

GuzzleHttp\Client\CallbackHandler::getIdentification ( )
private

Definition at line 80 of file CallbackHandler.php.

References ILIAS\Repository\refinery().

Referenced by GuzzleHttp\Client\CallbackHandler\run().

80  : IdentificationInterface
81  {
82  $hashed = $this->wrapper->query()->has(self::KEY_ITEM)
83  ? $this->wrapper->query()->retrieve(self::KEY_ITEM, $this->refinery->to()->string())
84  : '';
85 
86  $unhashed = $this->unhash($hashed);
87 
88  return $this->global_screen->identification()->fromSerializedIdentification($unhashed);
89  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resolveCallback()

GuzzleHttp\Client\CallbackHandler::resolveCallback ( isToolItem  $item)
private

Definition at line 72 of file CallbackHandler.php.

Referenced by GuzzleHttp\Client\CallbackHandler\run().

72  : \Closure
73  {
74  return $item->hasCloseCallback()
75  ? $item->getCloseCallback()
76  : static function (): void {
77  };
78  }
+ Here is the caller graph for this function:

◆ run()

GuzzleHttp\Client\CallbackHandler::run ( )

Definition at line 54 of file CallbackHandler.php.

References ILIAS\Repository\ctrl(), GuzzleHttp\Client\CallbackHandler\getIdentification(), and GuzzleHttp\Client\CallbackHandler\resolveCallback().

54  : void
55  {
56  $this->ctrl->setTargetScript(self::TARGET_SCRIPT);
57 
58  $this->global_screen->collector()
59  ->tool()
60  ->collectOnce();
61 
62  $item = $this->global_screen->collector()
63  ->tool()
64  ->getSingleItem($this->getIdentification());
65 
66  if ($item instanceof isToolItem) {
67  $callback = $this->resolveCallback($item);
68  $callback();
69  }
70  }
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrlInterface GuzzleHttp\Client\CallbackHandler::$ctrl
protected

Definition at line 42 of file CallbackHandler.php.

◆ $global_screen

Services GuzzleHttp\Client\CallbackHandler::$global_screen
protected

Definition at line 43 of file CallbackHandler.php.

◆ $refinery

Factory GuzzleHttp\Client\CallbackHandler::$refinery
protected

Definition at line 41 of file CallbackHandler.php.

◆ $wrapper

WrapperFactory GuzzleHttp\Client\CallbackHandler::$wrapper
protected

Definition at line 40 of file CallbackHandler.php.

◆ KEY_ITEM

const GuzzleHttp\Client\CallbackHandler::KEY_ITEM = 'item'

◆ TARGET_SCRIPT

const GuzzleHttp\Client\CallbackHandler::TARGET_SCRIPT = "/ilias.php"
private

Definition at line 37 of file CallbackHandler.php.


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