ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder Class Reference
+ Inheritance diagram for ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder:
+ Collaboration diagram for ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder:

Public Member Functions

 __construct (?int $user_id_of_owner=null)
 
 setOwner (int $user_id_of_owner)
 
 getFullyQualifiedClassName ()
 
 isResourceInUse (ResourceIdentification $identification)
 
 canBeAccessedByCurrentUser (ResourceIdentification $identification)
 
 resourceHasBeenDeleted (ResourceIdentification $identification)
 
 getOwnerOfResource (ResourceIdentification $identification)
 
 getConsumerNameForPresentation ()
 
 getLocationURIForResourceUsage (ResourceIdentification $identification)
 
- Public Member Functions inherited from ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder
 __construct ()
 Constructor must not have any parameters. More...
 
 getId ()
 
 getConsumerNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 canBeAccessedByCurrentUser (ResourceIdentification $identification)
 
 isResourceInUse (ResourceIdentification $identification)
 
 resourceHasBeenDeleted (ResourceIdentification $identification)
 
 getOwnerOfResource (ResourceIdentification $identification)
 
 getOwnerOfNewResources ()
 
 getLocationURIForResourceUsage (ResourceIdentification $identification)
 

Protected Attributes

int $default_owner
 
int $current_user
 

Private Attributes

string $provider_name_cache = ''
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::__construct ( ?int  $user_id_of_owner = null)

Reimplemented in ILIAS\Export\ExportHandler\Repository\Stakeholder\Handler.

Definition at line 36 of file AbstractResourceStakeholder.php.

37 {
38 global $DIC;
39
40 if ($user_id_of_owner === null) {
41 $user_id_of_owner = $DIC instanceof Container && $DIC->isDependencyAvailable('user')
42 ? $DIC->user()->getId()
43 : (defined('SYSTEM_USER_ID') ? (int) SYSTEM_USER_ID : 6);
44 }
45
46 $this->default_owner = $this->current_user = $user_id_of_owner;
47 }
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
Definition: constants.php:26
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\int(), and SYSTEM_USER_ID.

+ Here is the call graph for this function:

Member Function Documentation

◆ canBeAccessedByCurrentUser()

◆ getConsumerNameForPresentation()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::getConsumerNameForPresentation ( )

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Reimplemented in ILIAS\WOPI\Handler\WOPIStakeholderWrapper.

Definition at line 79 of file AbstractResourceStakeholder.php.

79 : string
80 {
81 if ($this->provider_name_cache !== "" && is_string($this->provider_name_cache)) {
83 }
84
85 $reflector = new \ReflectionClass($this);
86
87 $dirname = dirname($reflector->getFileName());
88 $after_components = substr($dirname, strpos($dirname, '/components/') + strlen('/components/'));
89 $parts = explode(
90 DIRECTORY_SEPARATOR,
91 $after_components
92 );
93
94 $parts = array_filter($parts, static function ($part): bool {
95 $ignore = ['IRSS', 'Storage', 'ResourceStorage', 'classes'];
96 return $part !== '' && !in_array($part, $ignore, true);
97 });
98
99 return $this->provider_name_cache = implode('/', $parts);
100 }
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61

References $parts, and ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder\$provider_name_cache.

◆ getFullyQualifiedClassName()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::getFullyQualifiedClassName ( )
Returns
string not longer than 250 characters

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Reimplemented in ILIAS\WOPI\Handler\WOPIStakeholderWrapper.

Definition at line 54 of file AbstractResourceStakeholder.php.

54 : string
55 {
56 return static::class;
57 }

◆ getLocationURIForResourceUsage()

◆ getOwnerOfResource()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::getOwnerOfResource ( ResourceIdentification  $identification)

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Reimplemented in ILIAS\WOPI\Handler\WOPIStakeholderWrapper.

Definition at line 74 of file AbstractResourceStakeholder.php.

74 : int
75 {
76 return 6;
77 }

◆ isResourceInUse()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::isResourceInUse ( ResourceIdentification  $identification)

Implements ILIAS\ResourceStorage\Stakeholder\ResourceStakeholder.

Reimplemented in ilHTLMStakeholder, and ILIAS\WOPI\Handler\WOPIStakeholderWrapper.

Definition at line 59 of file AbstractResourceStakeholder.php.

59 : bool
60 {
61 return false;
62 }

◆ resourceHasBeenDeleted()

◆ setOwner()

ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::setOwner ( int  $user_id_of_owner)

Definition at line 49 of file AbstractResourceStakeholder.php.

49 : void
50 {
51 $this->default_owner = $user_id_of_owner;
52 }

Referenced by ILIAS\WOPI\Handler\WOPIStakeholderWrapper\init().

+ Here is the caller graph for this function:

Field Documentation

◆ $current_user

int ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::$current_user
protected

Definition at line 34 of file AbstractResourceStakeholder.php.

◆ $default_owner

int ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::$default_owner
protected

Definition at line 33 of file AbstractResourceStakeholder.php.

Referenced by ILIAS\AdvancedMetaData\Record\File\Repository\Stakeholder\Handler\getOwnerOfNewResources(), ilBadgeFileStakeholder\getOwnerOfNewResources(), ilObjBibliographicStakeholder\getOwnerOfNewResources(), ilBookBookingInfoStakeholder\getOwnerOfNewResources(), ilBookObjectInfoStakeholder\getOwnerOfNewResources(), ILIAS\Certificate\File\ilCertificateTemplateStakeholder\getOwnerOfNewResources(), ilDataCollectionStakeholder\getOwnerOfNewResources(), ilExcInstructionFilesStakeholder\getOwnerOfNewResources(), ilExcPeerReviewFileStakeholder\getOwnerOfNewResources(), ilExcSampleSolutionStakeholder\getOwnerOfNewResources(), ilExcSubmissionStakeholder\getOwnerOfNewResources(), ilExcTutorFeedbackFileStakeholder\getOwnerOfNewResources(), ilExcTutorFeedbackZipStakeholder\getOwnerOfNewResources(), ilExcTutorTeamFeedbackFileStakeholder\getOwnerOfNewResources(), ilExportHTMLStakeholder\getOwnerOfNewResources(), ilObjFileStakeholder\getOwnerOfNewResources(), ILIAS\File\Icon\ilObjFileIconStakeholder\getOwnerOfNewResources(), ilTemporaryStakeholder\getOwnerOfNewResources(), ilForumPostingFileStakeholder\getOwnerOfNewResources(), ilHTLMStakeholder\getOwnerOfNewResources(), ILIAS\ILIASObject\Properties\CoreProperties\TileImage\Stakeholder\getOwnerOfNewResources(), ilIndividualAssessmentGradingStakeholder\getOwnerOfNewResources(), ilMMStorageStakeholder\getOwnerOfNewResources(), ilMobStakeholder\getOwnerOfNewResources(), ilMDCopyrightImageStakeholder\getOwnerOfNewResources(), ilOrgUnitTypeStakeholder\getOwnerOfNewResources(), ilSkillProfileStorageStakeHolder\getOwnerOfNewResources(), ilStudyProgrammeTypeStakeholder\getOwnerOfNewResources(), ilContentStyleStakeholder\getOwnerOfNewResources(), ILIAS\Test\ExportImport\ResultsExportStakeholder\getOwnerOfNewResources(), assFileUploadStakeholder\getOwnerOfNewResources(), ilUserProfilePictureStakeholder\getOwnerOfNewResources(), ILIAS\User\Settings\NewAccountMail\Stakeholder\getOwnerOfNewResources(), and ILIAS\WOPI\Handler\WOPIUnknownStakeholder\getOwnerOfNewResources().

◆ $provider_name_cache

string ILIAS\ResourceStorage\Stakeholder\AbstractResourceStakeholder::$provider_name_cache = ''
private

The documentation for this class was generated from the following file: