ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.InternalRepoService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Glossary;
22 
24 
26 {
27  protected static array $instance = [];
28 
29  public function __construct(
30  protected InternalDataService $data,
31  protected \ilDBInterface $db
32  ) {
33  }
34 
35  public function termSession(): Term\TermSessionRepository
36  {
37  return new Term\TermSessionRepository();
38  }
39 
40  public function flashcardTerm(): Flashcard\FlashcardTermDBRepository
41  {
42  return new Flashcard\FlashcardTermDBRepository($this->db, $this->data);
43  }
44 
45  public function flashcardBox(): Flashcard\FlashcardBoxDBRepository
46  {
47  return new Flashcard\FlashcardBoxDBRepository($this->db, $this->data);
48  }
49 
50  public function flashcardSession(): Flashcard\FlashcardSessionRepositoryInterface
51  {
52  return new Flashcard\FlashcardSessionRepository();
53  }
54 
55  public function presentationSession(): Presentation\PresentationSessionRepository
56  {
57  return new Presentation\PresentationSessionRepository();
58  }
59 
60  public function settings(): SettingsDBRepository
61  {
62  return self::$instance["settings"] ??= new SettingsDBRepository(
63  $this->db,
64  $this->data
65  );
66  }
67 
68 }
__construct(protected InternalDataService $data, protected \ilDBInterface $db)