ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\Component\Dependencies\Out Class Reference

A dependency where the component gives something to the world. More...

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

Public Member Functions

 __construct (protected OutType $type, string $name, public readonly mixed $aux, array $dependencies)
 
 __toString ()
 
 getType ()
 
 getName ()
 
 setComponent (OfComponent $component)
 
 getComponent ()
 
 addDependency (In $in)
 
 getDependencies ()
 
 addResolves (In $in)
 
 resetResolutions ()
 

Protected Attributes

Name string $name
 
array $dependencies = []
 
OfComponent $component = null
 
array $resolves = []
 

Detailed Description

A dependency where the component gives something to the world.

Definition at line 26 of file Out.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Component\Dependencies\Out::__construct ( protected OutType  $type,
string  $name,
public readonly mixed  $aux,
array  $dependencies 
)

Definition at line 33 of file Out.php.

References Vendor\Package\$d, ILIAS\Component\Dependencies\Out\$name, and ILIAS\Component\Dependencies\INTERNAL.

39  {
40  if ($type !== OutType::INTERNAL) {
41  $name = new Name($name);
42  }
43  $this->name = $name;
44  foreach ($dependencies as $d) {
45  $d->addDependant($this);
46  }
47  }

Member Function Documentation

◆ __toString()

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

Implements ILIAS\Component\Dependencies\Dependency.

Definition at line 49 of file Out.php.

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

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

◆ addDependency()

ILIAS\Component\Dependencies\Out::addDependency ( In  $in)

Definition at line 85 of file Out.php.

Referenced by ILIAS\Component\Dependencies\In\addDependant().

85  : void
86  {
87  $this->dependencies[(string) $in] = $in;
88  }
+ Here is the caller graph for this function:

◆ addResolves()

ILIAS\Component\Dependencies\Out::addResolves ( In  $in)

Definition at line 95 of file Out.php.

Referenced by ILIAS\Component\Dependencies\In\addResolution().

95  : void
96  {
97  $this->resolves[] = $in;
98  }
+ Here is the caller graph for this function:

◆ getComponent()

ILIAS\Component\Dependencies\Out::getComponent ( )

Definition at line 74 of file Out.php.

References ILIAS\Component\Dependencies\Out\$component.

74  : OfComponent
75  {
76  if (is_null($this->component)) {
77  throw new \LogicException(
78  "There is no component here."
79  );
80  }
81 
82  return $this->component;
83  }

◆ getDependencies()

ILIAS\Component\Dependencies\Out::getDependencies ( )

Definition at line 90 of file Out.php.

References ILIAS\Component\Dependencies\Out\$dependencies.

90  : array
91  {
92  return $this->dependencies;
93  }

◆ getName()

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

Implements ILIAS\Component\Dependencies\Dependency.

Definition at line 59 of file Out.php.

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

59  : string
60  {
61  return (string) $this->name;
62  }

◆ getType()

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

Definition at line 54 of file Out.php.

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

54  : OutType
55  {
56  return $this->type;
57  }
+ Here is the caller graph for this function:

◆ resetResolutions()

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

Definition at line 100 of file Out.php.

100  : void
101  {
102  $this->resolves = [];
103  }

◆ setComponent()

ILIAS\Component\Dependencies\Out::setComponent ( OfComponent  $component)

Definition at line 64 of file Out.php.

References ILIAS\Component\Dependencies\Out\$component.

64  : void
65  {
66  if (!is_null($this->component)) {
67  throw new \LogicException(
68  "There already is a component here."
69  );
70  }
71  $this->component = $component;
72  }

Field Documentation

◆ $component

OfComponent ILIAS\Component\Dependencies\Out::$component = null
protected

◆ $dependencies

array ILIAS\Component\Dependencies\Out::$dependencies = []
protected

Definition at line 29 of file Out.php.

Referenced by ILIAS\Component\Dependencies\Out\getDependencies().

◆ $name

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

◆ $resolves

array ILIAS\Component\Dependencies\Out::$resolves = []
protected

Definition at line 31 of file Out.php.


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