ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\File\Capabilities\Context Class Reference
+ Inheritance diagram for ILIAS\File\Capabilities\Context:
+ Collaboration diagram for ILIAS\File\Capabilities\Context:

Public Member Functions

 __construct (private int $object_id, private int $calling_id, private int $context)
 
 getObjectId ()
 
 getCallingId ()
 
 getContext ()
 
 getNode ()
 
 withCallingId (int $calling_id)
 
 withObjectId (int $object_id)
 
 __toString ()
 

Data Fields

const CONTEXT_REPO = 1
 
const CONTEXT_WORKSPACE = 2
 
const CONTEXT_SEARCH = 6
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 26 of file Context.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\File\Capabilities\Context::__construct ( private int  $object_id,
private int  $calling_id,
private int  $context 
)

Definition at line 32 of file Context.php.

36 {
37 // $context mut be one of the constants
38 if ($context !== self::CONTEXT_REPO && $context !== self::CONTEXT_WORKSPACE && $context !== self::CONTEXT_SEARCH) {
39 throw new \InvalidArgumentException('Invalid context');
40 }
41 }
$context
Definition: webdav.php:31

References $context.

Member Function Documentation

◆ __toString()

ILIAS\File\Capabilities\Context::__toString ( )

Definition at line 77 of file Context.php.

77 : string
78 {
79 return (string) $this->getCallingId();
80 }

References ILIAS\File\Capabilities\Context\getCallingId().

+ Here is the call graph for this function:

◆ getCallingId()

ILIAS\File\Capabilities\Context::getCallingId ( )

Definition at line 48 of file Context.php.

48 : int
49 {
50 return $this->calling_id;
51 }

Referenced by ILIAS\File\Capabilities\Context\__toString(), and ILIAS\File\Capabilities\Context\getNode().

+ Here is the caller graph for this function:

◆ getContext()

ILIAS\File\Capabilities\Context::getContext ( )

Definition at line 53 of file Context.php.

53 : int
54 {
55 return $this->context;
56 }

References $context.

Referenced by ILIAS\File\Capabilities\Context\getNode().

+ Here is the caller graph for this function:

◆ getNode()

ILIAS\File\Capabilities\Context::getNode ( )

Definition at line 58 of file Context.php.

58 : string
59 {
60 return $this->getContext() . '_' . $this->getCallingId();
61 }

References ILIAS\File\Capabilities\Context\getCallingId(), and ILIAS\File\Capabilities\Context\getContext().

+ Here is the call graph for this function:

◆ getObjectId()

ILIAS\File\Capabilities\Context::getObjectId ( )

Definition at line 43 of file Context.php.

43 : int
44 {
45 return $this->object_id;
46 }

◆ withCallingId()

ILIAS\File\Capabilities\Context::withCallingId ( int  $calling_id)

Definition at line 63 of file Context.php.

63 : self
64 {
65 $clone = clone $this;
66 $clone->calling_id = $calling_id;
67 return $clone;
68 }

◆ withObjectId()

ILIAS\File\Capabilities\Context::withObjectId ( int  $object_id)

Definition at line 70 of file Context.php.

70 : self
71 {
72 $clone = clone $this;
73 $clone->object_id = $object_id;
74 return $clone;
75 }

Field Documentation

◆ CONTEXT_REPO

const ILIAS\File\Capabilities\Context::CONTEXT_REPO = 1

Definition at line 28 of file Context.php.

◆ CONTEXT_SEARCH

const ILIAS\File\Capabilities\Context::CONTEXT_SEARCH = 6

Definition at line 30 of file Context.php.

◆ CONTEXT_WORKSPACE

const ILIAS\File\Capabilities\Context::CONTEXT_WORKSPACE = 2

Definition at line 29 of file Context.php.

Referenced by ILIAS\File\Capabilities\Check\BaseCheck\baseClass().


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