ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 __toString ()
 
 getName ()
 

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.

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 }

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

Member Function Documentation

◆ __toString()

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

Implements ILIAS\Component\Dependencies\Dependency.

Definition at line 49 of file Out.php.

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

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

◆ addDependency()

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

Definition at line 85 of file Out.php.

85 : void
86 {
87 $this->dependencies[(string) $in] = $in;
88 }

◆ addResolves()

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

Definition at line 95 of file Out.php.

95 : void
96 {
97 $this->resolves[] = $in;
98 }

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

+ Here is the caller graph for this function:

◆ getComponent()

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

Definition at line 74 of file Out.php.

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 }

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

◆ getDependencies()

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

Definition at line 90 of file Out.php.

90 : array
91 {
93 }

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

◆ getName()

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

Implements ILIAS\Component\Dependencies\Dependency.

Definition at line 59 of file Out.php.

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

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

◆ getType()

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

Definition at line 54 of file Out.php.

54 : OutType
55 {
56 return $this->type;
57 }

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

+ 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.

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 }

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

Field Documentation

◆ $component

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

◆ $dependencies

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

◆ $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: