ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\ResourceStorage\Services Class Reference

Class Services. More...

+ Inheritance diagram for ILIAS\ResourceStorage\Services:
+ Collaboration diagram for ILIAS\ResourceStorage\Services:

Public Member Functions

 __construct (StorageHandlerFactory $storage_handler_factory, Repositories $repositories, Artifacts $artifacts, LockHandler $lock_handler, FileNamePolicy $file_name_policy, StreamAccess $stream_access, Factory $machine_factory, ?SrcBuilder $src_builder=null, ?RepositoryPreloader $preloader=null, ?ObserverCollection $observers=null,)
 Services constructor. More...
 
 manage ()
 
 manageContainer ()
 
 consume ()
 
 collection ()
 
 flavours ()
 
 preload (array $identification_strings)
 
 preloadCollections (array $collection_identification_strings)
 
 events ()
 
 manage ()
 
 manageContainer ()
 
 consume ()
 
 collection ()
 
 flavours ()
 
 preload (array $identification_strings)
 
 preloadCollections (array $collection_identification_strings)
 
 events ()
 

Protected Attributes

Subject $events
 
Manager $manager
 
ContainerManager $container_manager
 
Consumers $consumers
 
Collections $collections
 
Flavours $flavours
 
RepositoryPreloader $preloader
 

Detailed Description

Class Services.

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s.ch

Definition at line 52 of file Services.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ResourceStorage\Services::__construct ( StorageHandlerFactory  $storage_handler_factory,
Repositories  $repositories,
Artifacts  $artifacts,
LockHandler  $lock_handler,
FileNamePolicy  $file_name_policy,
StreamAccess  $stream_access,
Factory  $machine_factory,
?SrcBuilder  $src_builder = null,
?RepositoryPreloader  $preloader = null,
?ObserverCollection  $observers = null 
)

Services constructor.

Definition at line 65 of file Services.php.

76 {
77 $this->events = new Subject();
78 $src_builder ??= new InlineSrcBuilder();
79 $file_name_policy_stack = new FileNamePolicyStack();
80 $file_name_policy_stack->addPolicy($file_name_policy);
81 $resource_builder = new ResourceBuilder(
82 $storage_handler_factory,
83 $repositories,
84 $lock_handler,
85 $stream_access,
86 $file_name_policy_stack
87 );
88 $collection_builder = new CollectionBuilder(
89 $repositories->getCollectionRepository(),
90 $this->events,
91 new UniqueIDCollectionIdentificationGenerator(),
92 $lock_handler
93 );
94 $this->preloader = $preloader ?? new StandardRepositoryPreloader($repositories);
95 $this->manager = new Manager(
96 $resource_builder,
97 $collection_builder,
98 $this->preloader
99 );
100 $this->container_manager = new ContainerManager(
101 $resource_builder,
102 $collection_builder,
103 $this->preloader,
104 $this->events
105 );
106 $this->consumers = new Consumers(
107 new ConsumerFactory(
108 $stream_access,
109 $file_name_policy_stack
110 ),
111 $resource_builder,
112 $collection_builder,
113 $src_builder
114 );
115 $this->collections = new Collections(
116 $resource_builder,
117 $collection_builder,
118 $this->preloader,
119 $this->events
120 );
121
122 $flavour_builder = new FlavourBuilder(
123 $repositories->getFlavourRepository(),
124 $machine_factory,
125 $resource_builder,
126 $storage_handler_factory,
127 $stream_access,
128 $this->events
129 );
130
131 $this->flavours = new Flavours(
132 $flavour_builder,
133 $resource_builder
134 );
135
136 if ($observers !== null) {
137 foreach ($observers as $observer) {
138 $this->events->attach(
139 $observer,
141 );
142 }
143 }
144 }
RepositoryPreloader $preloader
Definition: Services.php:60
@ ALL
event string being used if

References ILIAS\ResourceStorage\Services\$preloader, ALL, ILIAS\ResourceStorage\Services\events(), ILIAS\ResourceStorage\Services\flavours(), ILIAS\ResourceStorage\Repositories\getCollectionRepository(), and ILIAS\ResourceStorage\Repositories\getFlavourRepository().

+ Here is the call graph for this function:

Member Function Documentation

◆ collection()

ILIAS\ResourceStorage\Services::collection ( )

Implements ILIAS\ResourceStorage\IRSSServices.

Definition at line 161 of file Services.php.

162 {
163 return $this->collections;
164 }

References ILIAS\ResourceStorage\Services\$collections.

◆ consume()

ILIAS\ResourceStorage\Services::consume ( )

Implements ILIAS\ResourceStorage\IRSSServices.

Definition at line 156 of file Services.php.

156 : Consumers
157 {
158 return $this->consumers;
159 }

References ILIAS\ResourceStorage\Services\$consumers.

◆ events()

ILIAS\ResourceStorage\Services::events ( )

Implements ILIAS\ResourceStorage\IRSSServices.

Definition at line 184 of file Services.php.

184 : Subject
185 {
186 return $this->events;
187 }

References ILIAS\ResourceStorage\Services\$events.

Referenced by ILIAS\ResourceStorage\Services\__construct().

+ Here is the caller graph for this function:

◆ flavours()

ILIAS\ResourceStorage\Services::flavours ( )

Implements ILIAS\ResourceStorage\IRSSServices.

Definition at line 166 of file Services.php.

166 : Flavours
167 {
168 return $this->flavours;
169 }

References ILIAS\ResourceStorage\Services\$flavours.

Referenced by ILIAS\ResourceStorage\Services\__construct().

+ Here is the caller graph for this function:

◆ manage()

ILIAS\ResourceStorage\Services::manage ( )

Implements ILIAS\ResourceStorage\IRSSServices.

Definition at line 146 of file Services.php.

146 : Manager
147 {
148 return $this->manager;
149 }

References ILIAS\ResourceStorage\Services\$manager.

◆ manageContainer()

ILIAS\ResourceStorage\Services::manageContainer ( )

Implements ILIAS\ResourceStorage\IRSSServices.

Definition at line 151 of file Services.php.

152 {
154 }
ContainerManager $container_manager
Definition: Services.php:56

References ILIAS\ResourceStorage\Services\$container_manager.

◆ preload()

ILIAS\ResourceStorage\Services::preload ( array  $identification_strings)

Implements ILIAS\ResourceStorage\IRSSServices.

Definition at line 171 of file Services.php.

171 : void
172 {
173 $this->preloader->preload($identification_strings);
174 }

◆ preloadCollections()

ILIAS\ResourceStorage\Services::preloadCollections ( array  $collection_identification_strings)
Parameters
string[]$collection_identification_strings

Implements ILIAS\ResourceStorage\IRSSServices.

Definition at line 179 of file Services.php.

179 : void
180 {
181 $this->preloader->preloadCollections($collection_identification_strings);
182 }

Field Documentation

◆ $collections

Collections ILIAS\ResourceStorage\Services::$collections
protected

Definition at line 58 of file Services.php.

Referenced by ILIAS\ResourceStorage\Services\collection().

◆ $consumers

Consumers ILIAS\ResourceStorage\Services::$consumers
protected

Definition at line 57 of file Services.php.

Referenced by ILIAS\ResourceStorage\Services\consume().

◆ $container_manager

ContainerManager ILIAS\ResourceStorage\Services::$container_manager
protected

Definition at line 56 of file Services.php.

Referenced by ILIAS\ResourceStorage\Services\manageContainer().

◆ $events

Subject ILIAS\ResourceStorage\Services::$events
protected

Definition at line 54 of file Services.php.

Referenced by ILIAS\ResourceStorage\Services\events().

◆ $flavours

Flavours ILIAS\ResourceStorage\Services::$flavours
protected

Definition at line 59 of file Services.php.

Referenced by ILIAS\ResourceStorage\Services\flavours().

◆ $manager

Manager ILIAS\ResourceStorage\Services::$manager
protected

Definition at line 55 of file Services.php.

Referenced by ILIAS\ResourceStorage\Services\manage().

◆ $preloader

RepositoryPreloader ILIAS\ResourceStorage\Services::$preloader
protected

Definition at line 60 of file Services.php.

Referenced by ILIAS\ResourceStorage\Services\__construct().


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