ILIAS  release_7 Revision v7.30-3-g800a261c036
ContextServices.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
24
30{
35
39 private $collection;
40
44 public function __construct()
45 {
46 $this->context_repository = new ContextRepository();
47 $this->collection = new CalledContexts($this->context_repository);
48 }
49
53 public function stack() : CalledContexts
54 {
55 return $this->collection;
56 }
57
61 public function current() : ScreenContext
62 {
63 return $this->collection->current();
64 }
65
69 public function claim() : CalledContexts
70 {
71 return $this->collection;
72 }
73
74 public function collection() : ContextCollection
75 {
76 return new ContextCollection($this->context_repository);
77 }
78
83 {
85 }
86}
An exception for terminatinating execution or to throw for unit testing.