ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
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.

References $id.

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

◆ offsetGet()

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

Definition at line 44 of file RenamingDIC.php.

References $id.

44  : mixed
45  {
46  return $this->wrapped->offsetGet($id);
47  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ offsetSet()

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

Definition at line 37 of file RenamingDIC.php.

References $id.

37  : void
38  {
39  $id = "{$id}_{$this->counter}";
40  $this->counter++;
41  $this->wrapped->offsetSet($id, $value);
42  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ offsetUnset()

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

Definition at line 54 of file RenamingDIC.php.

References $id.

54  : void
55  {
56  $this->wrapped->offsetUnset($id);
57  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

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: