ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
AbstractProvider.php
Go to the documentation of this file.
2 
5 
11 abstract class AbstractProvider implements Provider
12 {
13 
17  protected $dic;
21  private $provider_name_cache = "";
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 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:16
Class ilCertificateAppEventListener.