ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
AbstractProvider.php
Go to the documentation of this file.
2
5
11abstract class AbstractProvider implements Provider
12{
13
17 protected $dic;
22
23
27 public function __construct(Container $dic)
28 {
29 $this->dic = $dic;
30 }
31
32
36 protected function globalScreen() : Services
37 {
38 return $this->dic->globalScreen();
39 }
40
41
45 final public function getFullyQualifiedClassName() : string
46 {
47 return self::class;
48 }
49
50
55 public function getProviderNameForPresentation() : string
56 {
57 if ($this->provider_name_cache !== "" && is_string($this->provider_name_cache)) {
59 }
60 $reflector = new \ReflectionClass($this);
61
62 $re = "/.*[\\\|\\/](?P<provider>(Services|Modules)[\\\|\\/].*)[\\\|\\/]classes/m";
63
64 preg_match($re, str_replace("\\", "/", $reflector->getFileName()), $matches);
65
66 $this->provider_name_cache = isset($matches[1]) ? is_string($matches[1]) ? $matches[1] : self::class : self::class;
67
69 }
70}
An exception for terminatinating execution or to throw for unit testing.
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:18
Class ilAsqQuestionAuthoringFactory.