19declare(strict_types=1);
40 if ($user_id_of_owner ===
null) {
41 $user_id_of_owner =
$DIC instanceof
Container &&
$DIC->isDependencyAvailable(
'user')
42 ?
$DIC->user()->getId()
46 $this->default_owner = $this->current_user = $user_id_of_owner;
49 public function setOwner(
int $user_id_of_owner): void
51 $this->default_owner = $user_id_of_owner;
81 if ($this->provider_name_cache !==
"" && is_string($this->provider_name_cache)) {
85 $reflector = new \ReflectionClass($this);
87 $dirname = dirname($reflector->getFileName());
88 $after_components = substr($dirname, strpos($dirname,
'/components/') + strlen(
'/components/'));
94 $parts = array_filter(
$parts,
static function ($part):
bool {
95 $ignore = [
'IRSS',
'Storage',
'ResourceStorage',
'classes'];
96 return $part !==
'' && !in_array($part, $ignore,
true);
99 return $this->provider_name_cache = implode(
'/',
$parts);
Customizing of pimple-DIC for ILIAS.
Class ResourceIdentification.
string $provider_name_cache
__construct(?int $user_id_of_owner=null)
getConsumerNameForPresentation()
canBeAccessedByCurrentUser(ResourceIdentification $identification)
resourceHasBeenDeleted(ResourceIdentification $identification)
getFullyQualifiedClassName()
isResourceInUse(ResourceIdentification $identification)
getOwnerOfResource(ResourceIdentification $identification)
getLocationURIForResourceUsage(ResourceIdentification $identification)
setOwner(int $user_id_of_owner)
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
Interface ResourceStakeholder.
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts