ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
AbstractResourceStakeholder.php
Go to the documentation of this file.
1 <?php declare(strict_types=1);
2 
4 
6 
13 {
14 
18  private $provider_name_cache = '';
19 
20 
24  public function getFullyQualifiedClassName() : string
25  {
26  return static::class;
27  }
28 
29 
33  public function isResourceInUse(ResourceIdentification $identification) : bool
34  {
35  return false;
36  }
37 
38 
42  public function resourceHasBeenDeleted(ResourceIdentification $identification) : void
43  {
44  // TODO: Implement resourceHasBeenDeleted() method.
45  }
46 
47 
51  public function getOwnerOfResource(ResourceIdentification $identification) : int
52  {
53  return 6;
54  }
55 
56 
60  public function getConsumerNameForPresentation() : string
61  {
62  if ($this->provider_name_cache !== '' && is_string($this->provider_name_cache)) {
64  }
65  $reflector = new \ReflectionClass($this);
66 
67  $re = "/.*[\\\|\\/](?P<provider>(Services|Modules)[\\\|\\/].*)[\\\|\\/]classes/m";
68 
69  preg_match($re, str_replace("\\", "/", $reflector->getFileName()), $matches);
70 
71  $this->provider_name_cache = isset($matches[1]) ? is_string($matches[1]) ? $matches[1] : self::class : self::class;
72 
74  }
75 }