ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Component\Dependencies\In Class Reference

A dependency where the component needs something from the world. More...

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

Public Member Functions

 __construct (protected InType $type, string $name, protected array $resolved_by=[])
 
 getName ()
 
 __toString ()
 
 getType ()
 
 addDependant (Out $out)
 
 addResolution (Out $other)
 
 getResolvedBy ()
 
 resetResolutions ()
 

Protected Attributes

Name string $name
 
array $dependant = []
 

Detailed Description

A dependency where the component needs something from the world.

Definition at line 26 of file In.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Component\Dependencies\In::__construct ( protected InType  $type,
string  $name,
protected array  $resolved_by = [] 
)

Definition at line 31 of file In.php.

References ILIAS\Component\Dependencies\In\$name, and ILIAS\Component\Dependencies\INTERNAL.

35  {
36  if ($type !== InType::INTERNAL) {
37  $name = new Name($name);
38  }
39  $this->name = $name;
40  }

Member Function Documentation

◆ __toString()

ILIAS\Component\Dependencies\In::__toString ( )

Implements ILIAS\Component\Dependencies\Dependency.

Definition at line 47 of file In.php.

References ILIAS\Component\Dependencies\In\$name.

47  : string
48  {
49  return $this->type->value . ": " . $this->name;
50  }

◆ addDependant()

ILIAS\Component\Dependencies\In::addDependant ( Out  $out)

Definition at line 57 of file In.php.

References ILIAS\Component\Dependencies\Out\addDependency().

57  : void
58  {
59  $this->dependant[(string) $out] = $out;
60  $out->addDependency($this);
61  }
$out
Definition: buildRTE.php:24
+ Here is the call graph for this function:

◆ addResolution()

ILIAS\Component\Dependencies\In::addResolution ( Out  $other)

Definition at line 63 of file In.php.

References ILIAS\Component\Dependencies\Out\addResolves().

Referenced by ILIAS\Component\Dependencies\Resolver\resolvePull(), ILIAS\Component\Dependencies\Resolver\resolveSeek(), and ILIAS\Component\Dependencies\Resolver\resolveUse().

63  : void
64  {
65  if ($this->type !== InType::SEEK && count($this->resolved_by) > 0) {
66  throw new LogicException(
67  "Dependency of type {$this->type} can only be resolved once."
68  );
69  }
70  $this->resolved_by[] = $other;
71  $other->addResolves($this);
72  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getName()

ILIAS\Component\Dependencies\In::getName ( )

◆ getResolvedBy()

ILIAS\Component\Dependencies\In::getResolvedBy ( )

Definition at line 74 of file In.php.

Referenced by ILIAS\Component\Dependencies\Resolver\findCyclesWith().

74  : array
75  {
76  return $this->resolved_by;
77  }
+ Here is the caller graph for this function:

◆ getType()

ILIAS\Component\Dependencies\In::getType ( )

Definition at line 52 of file In.php.

Referenced by ILIAS\Component\Dependencies\OfComponent\getInDependenciesOf().

52  : InType
53  {
54  return $this->type;
55  }
+ Here is the caller graph for this function:

◆ resetResolutions()

ILIAS\Component\Dependencies\In::resetResolutions ( )

Definition at line 79 of file In.php.

79  : void
80  {
81  $this->resolved_by = [];
82  }

Field Documentation

◆ $dependant

array ILIAS\Component\Dependencies\In::$dependant = []
protected

Definition at line 29 of file In.php.

◆ $name

Name string ILIAS\Component\Dependencies\In::$name
protected

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