ILIAS  release_7 Revision v7.30-3-g800a261c036
AbstractBaseCollector.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
26abstract class AbstractBaseCollector implements Collector
27{
31 private $has_been_collected = false;
32
33 private function setCollected() : void
34 {
35 $this->has_been_collected = true;
36 }
37
38 public function hasBeenCollected() : bool
39 {
41 }
42
43 public function collectOnce() : void
44 {
45 if (!$this->hasBeenCollected()) {
46 $this->collectStructure();
47 $this->prepareItemsForUIRepresentation();
48 $this->filterItemsByVisibilty();
49 $this->cleanupItemsForUIRepresentation();
50 $this->sortItemsForUIRepresentation();
51 $this->setCollected();
52 }
53 }
54}
An exception for terminatinating execution or to throw for unit testing.
collectOnce()
Runs the Collection of all items from the providers.
@noinspection PhpIncompatibleReturnTypeInspection