ILIAS  release_7 Revision v7.30-3-g800a261c036
AbstractResourceStakeholder.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
6
12{
13
18
22 public function getFullyQualifiedClassName() : string
23 {
24 return static::class;
25 }
26
30 public function isResourceInUse(ResourceIdentification $identification) : bool
31 {
32 return false;
33 }
34
38 public function resourceHasBeenDeleted(ResourceIdentification $identification) : bool
39 {
40 return true;
41 }
42
46 public function getOwnerOfResource(ResourceIdentification $identification) : int
47 {
48 return 6;
49 }
50
54 public function getConsumerNameForPresentation() : string
55 {
56 if ($this->provider_name_cache !== '' && is_string($this->provider_name_cache)) {
58 }
59 $reflector = new \ReflectionClass($this);
60
61 $re = "/.*[\\\|\\/](?P<provider>(Services|Modules)[\\\|\\/].*)[\\\|\\/]classes/m";
62
63 preg_match($re, str_replace("\\", "/", $reflector->getFileName()), $matches);
64
65 $this->provider_name_cache = isset($matches[1]) ? is_string($matches[1]) ? $matches[1] : self::class : self::class;
66
68 }
69}
An exception for terminatinating execution or to throw for unit testing.
resourceHasBeenDeleted(ResourceIdentification $identification)
@inheritDoc
isResourceInUse(ResourceIdentification $identification)
@inheritDoc
getOwnerOfResource(ResourceIdentification $identification)
@inheritDoc