ILIAS  trunk Revision v11.0_alpha-1838-g59fc79e306b
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Component\Dependencies\SetGetProbe Class Reference
+ Inheritance diagram for ILIAS\Component\Dependencies\SetGetProbe:
+ Collaboration diagram for ILIAS\Component\Dependencies\SetGetProbe:

Public Member Functions

 __construct (protected $set_probe, protected $get_probe)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 

Detailed Description

Definition at line 25 of file SetGetProbe.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Component\Dependencies\SetGetProbe::__construct ( protected  $set_probe,
protected  $get_probe 
)

Definition at line 27 of file SetGetProbe.php.

30  {
31  if (!is_callable($set_probe)) {
32  throw new \InvalidArgumentException(
33  "Expected \$probe to be callable."
34  );
35  }
36 
37  if (!is_callable($get_probe)) {
38  throw new \InvalidArgumentException(
39  "Expected \$probe to be callable."
40  );
41  }
42  }

Member Function Documentation

◆ offsetExists()

ILIAS\Component\Dependencies\SetGetProbe::offsetExists (   $offset)

Definition at line 44 of file SetGetProbe.php.

44  : bool
45  {
46  return false;
47  }

◆ offsetGet()

ILIAS\Component\Dependencies\SetGetProbe::offsetGet (   $offset)

Definition at line 49 of file SetGetProbe.php.

49  : mixed
50  {
51  $probe = $this->get_probe;
52  return $probe($offset);
53  }

◆ offsetSet()

ILIAS\Component\Dependencies\SetGetProbe::offsetSet (   $offset,
  $value 
)

Definition at line 55 of file SetGetProbe.php.

55  : void
56  {
57  $probe = $this->set_probe;
58  $probe($offset, $value);
59  }

◆ offsetUnset()

ILIAS\Component\Dependencies\SetGetProbe::offsetUnset (   $offset)

Definition at line 61 of file SetGetProbe.php.

61  : void
62  {
63  }

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