ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLTIConsumerServiceBase Class Reference
+ Inheritance diagram for ilLTIConsumerServiceBase:
+ Collaboration diagram for ilLTIConsumerServiceBase:

Public Member Functions

 __construct ()
 
 getResources ()
 Get the resources for this service. More...
 
 setResourcePath (string $resourcePath)
 Set the cleaned resourcePath without service part. More...
 
 getResourcePath ()
 Get cleaned resourcePath without service part. More...
 
 checkTool ()
 Check that the request has been properly signed and is permitted. More...
 

Data Fields

const LTI_VERSION2P0 = 'LTI-2p0'
 
const SERVICE_ENABLED = 1
 

Protected Member Functions

 parseValue (string $value)
 Parse a string for custom substitution parameter variables supported by this service's resources. More...
 

Protected Attributes

string $id
 ID for the service. More...
 
string $name
 Human readable name for the service. More...
 
bool $unsigned
 if requests for this service do not need to be signed. More...
 
array $resources
 Instances of the resources associated with this service. More...
 
string $resourcePath
 cleaned requested resourcePath More...
 

Private Attributes

array $services
 lti services (for further use) More...
 
stdClass $toolproxy
 Tool proxy object for the current service request. More...
 
stdClass $type
 LTI type object for the current service request. More...
 
array $typeconfig
 LTI type config array for the current service request. More...
 

Detailed Description

Definition at line 30 of file class.ilLTIConsumerServiceBase.php.

Constructor & Destructor Documentation

◆ __construct()

ilLTIConsumerServiceBase::__construct ( )

Definition at line 63 of file class.ilLTIConsumerServiceBase.php.

64  {
65  $this->services = array(
66  'gradeservice'
67  );
68  $this->id = '';
69  $this->name = '';
70  $this->unsigned = false;
71  $this->toolproxy = null;
72  $this->type = null;
73  $this->typeconfig = null;
74  $this->resources = null;
75  $this->resourcePath = '';
76  }

Member Function Documentation

◆ checkTool()

ilLTIConsumerServiceBase::checkTool ( )

Check that the request has been properly signed and is permitted.

Definition at line 118 of file class.ilLTIConsumerServiceBase.php.

References ilObjLTIConsumer\verifyToken().

118  : ?object
119  {
121  }
+ Here is the call graph for this function:

◆ getResourcePath()

ilLTIConsumerServiceBase::getResourcePath ( )

Get cleaned resourcePath without service part.

Definition at line 110 of file class.ilLTIConsumerServiceBase.php.

References $resourcePath.

110  : string
111  {
112  return $this->resourcePath;
113  }
string $resourcePath
cleaned requested resourcePath

◆ getResources()

ilLTIConsumerServiceBase::getResources ( )
abstract

Get the resources for this service.

Referenced by parseValue().

+ Here is the caller graph for this function:

◆ parseValue()

ilLTIConsumerServiceBase::parseValue ( string  $value)
protected

Parse a string for custom substitution parameter variables supported by this service's resources.

Definition at line 81 of file class.ilLTIConsumerServiceBase.php.

References getResources().

81  : string
82  {
83  if (empty($this->resources)) {
84  $this->resources = $this->getResources();
85  }
86  if (!empty($this->resources)) {
87  foreach ($this->resources as $resource) {
88  $value = $resource->parseValue($value);
89  }
90  }
91  return $value;
92  }
getResources()
Get the resources for this service.
+ Here is the call graph for this function:

◆ setResourcePath()

ilLTIConsumerServiceBase::setResourcePath ( string  $resourcePath)

Set the cleaned resourcePath without service part.

Definition at line 102 of file class.ilLTIConsumerServiceBase.php.

References $resourcePath.

102  : void
103  {
104  $this->resourcePath = $resourcePath;
105  }
string $resourcePath
cleaned requested resourcePath

Field Documentation

◆ $id

string ilLTIConsumerServiceBase::$id
protected

ID for the service.

Definition at line 40 of file class.ilLTIConsumerServiceBase.php.

◆ $name

string ilLTIConsumerServiceBase::$name
protected

Human readable name for the service.

Definition at line 43 of file class.ilLTIConsumerServiceBase.php.

◆ $resourcePath

string ilLTIConsumerServiceBase::$resourcePath
protected

cleaned requested resourcePath

Definition at line 61 of file class.ilLTIConsumerServiceBase.php.

Referenced by getResourcePath(), and setResourcePath().

◆ $resources

array ilLTIConsumerServiceBase::$resources
protected

Instances of the resources associated with this service.

Definition at line 58 of file class.ilLTIConsumerServiceBase.php.

Referenced by ilLTIConsumerGradeService\getResources().

◆ $services

array ilLTIConsumerServiceBase::$services
private

lti services (for further use)

Definition at line 37 of file class.ilLTIConsumerServiceBase.php.

◆ $toolproxy

stdClass ilLTIConsumerServiceBase::$toolproxy
private

Tool proxy object for the current service request.

Definition at line 49 of file class.ilLTIConsumerServiceBase.php.

◆ $type

stdClass ilLTIConsumerServiceBase::$type
private

LTI type object for the current service request.

Definition at line 52 of file class.ilLTIConsumerServiceBase.php.

◆ $typeconfig

array ilLTIConsumerServiceBase::$typeconfig
private

LTI type config array for the current service request.

Definition at line 55 of file class.ilLTIConsumerServiceBase.php.

◆ $unsigned

bool ilLTIConsumerServiceBase::$unsigned
protected

if requests for this service do not need to be signed.

Definition at line 46 of file class.ilLTIConsumerServiceBase.php.

◆ LTI_VERSION2P0

const ilLTIConsumerServiceBase::LTI_VERSION2P0 = 'LTI-2p0'

Definition at line 32 of file class.ilLTIConsumerServiceBase.php.

◆ SERVICE_ENABLED

const ilLTIConsumerServiceBase::SERVICE_ENABLED = 1

Definition at line 34 of file class.ilLTIConsumerServiceBase.php.


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