ILIAS  release_8 Revision v8.24
AbstractResourceStakeholder.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
30{
31 private string $provider_name_cache = '';
32
36 public function getFullyQualifiedClassName(): string
37 {
38 return static::class;
39 }
40
44 public function isResourceInUse(ResourceIdentification $identification): bool
45 {
46 return false;
47 }
48
52 public function resourceHasBeenDeleted(ResourceIdentification $identification): bool
53 {
54 return true;
55 }
56
60 public function getOwnerOfResource(ResourceIdentification $identification): int
61 {
62 return 6;
63 }
64
68 public function getConsumerNameForPresentation(): string
69 {
70 if ($this->provider_name_cache !== '' && is_string($this->provider_name_cache)) {
72 }
73 $reflector = new \ReflectionClass($this);
74
75 $re = "/.*[\\\|\\/](?P<provider>(Services|Modules)[\\\|\\/].*)[\\\|\\/]classes/m";
76
77 preg_match($re, str_replace("\\", "/", $reflector->getFileName()), $matches);
78
79 $this->provider_name_cache = isset($matches[1]) ? is_string(
80 $matches[1]
81 ) ? $matches[1] : self::class : self::class;
82
84 }
85}
resourceHasBeenDeleted(ResourceIdentification $identification)
@inheritDoc
isResourceInUse(ResourceIdentification $identification)
@inheritDoc
getOwnerOfResource(ResourceIdentification $identification)
@inheritDoc