ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Component\Dependencies\RenamingDIC Class Reference

A wrapper around another DIC that superficially adds a _# and passes them to an underlying DIC. More...

+ Inheritance diagram for ILIAS\Component\Dependencies\RenamingDIC:
+ Collaboration diagram for ILIAS\Component\Dependencies\RenamingDIC:

Public Member Functions

 __construct (protected \ArrayAccess $wrapped)
 
 offsetSet ($id, $value)
 
 offsetGet ($id)
 
 offsetExists ($id)
 
 offsetUnset ($id)
 

Protected Attributes

int $counter = 0
 

Detailed Description

A wrapper around another DIC that superficially adds a _# and passes them to an underlying DIC.

# is a counter over all objects that have been added, starting by 0.

Definition at line 28 of file RenamingDIC.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Component\Dependencies\RenamingDIC::__construct ( protected \ArrayAccess  $wrapped)

Definition at line 32 of file RenamingDIC.php.

34 {
35 }

Member Function Documentation

◆ offsetExists()

ILIAS\Component\Dependencies\RenamingDIC::offsetExists (   $id)

Definition at line 49 of file RenamingDIC.php.

49 : bool
50 {
51 return $this->wrapped->offsetExists($id);
52 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

References $id.

◆ offsetGet()

ILIAS\Component\Dependencies\RenamingDIC::offsetGet (   $id)

Definition at line 44 of file RenamingDIC.php.

44 : mixed
45 {
46 return $this->wrapped->offsetGet($id);
47 }

References $id.

◆ offsetSet()

ILIAS\Component\Dependencies\RenamingDIC::offsetSet (   $id,
  $value 
)

Definition at line 37 of file RenamingDIC.php.

37 : void
38 {
39 $id = "{$id}_{$this->counter}";
40 $this->counter++;
41 $this->wrapped->offsetSet($id, $value);
42 }

References $id.

◆ offsetUnset()

ILIAS\Component\Dependencies\RenamingDIC::offsetUnset (   $id)

Definition at line 54 of file RenamingDIC.php.

54 : void
55 {
56 $this->wrapped->offsetUnset($id);
57 }

References $id.

Field Documentation

◆ $counter

int ILIAS\Component\Dependencies\RenamingDIC::$counter = 0
protected

Definition at line 30 of file RenamingDIC.php.


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