ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 29 of file class.ilLTIConsumerServiceBase.php.

Constructor & Destructor Documentation

◆ __construct()

ilLTIConsumerServiceBase::__construct ( )

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

References null, and ILIAS\Repository\resources().

63  {
64  $this->services = array(
65  'gradeservice'
66  );
67  $this->id = '';
68  $this->name = '';
69  $this->unsigned = false;
70  $this->toolproxy = null;
71  $this->type = null;
72  $this->typeconfig = null;
73  $this->resources = null;
74  $this->resourcePath = '';
75  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

Member Function Documentation

◆ checkTool()

ilLTIConsumerServiceBase::checkTool ( )

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

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

References ilObjLTIConsumer\verifyToken().

117  : ?object
118  {
120  }
+ Here is the call graph for this function:

◆ getResourcePath()

ilLTIConsumerServiceBase::getResourcePath ( )

Get cleaned resourcePath without service part.

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

References $resourcePath.

109  : string
110  {
111  return $this->resourcePath;
112  }
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 80 of file class.ilLTIConsumerServiceBase.php.

References getResources(), and ILIAS\Repository\resources().

80  : string
81  {
82  if (empty($this->resources)) {
83  $this->resources = $this->getResources();
84  }
85  if (!empty($this->resources)) {
86  foreach ($this->resources as $resource) {
87  $value = $resource->parseValue($value);
88  }
89  }
90  return $value;
91  }
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 101 of file class.ilLTIConsumerServiceBase.php.

References $resourcePath.

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

Field Documentation

◆ $id

string ilLTIConsumerServiceBase::$id
protected

ID for the service.

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

◆ $name

string ilLTIConsumerServiceBase::$name
protected

Human readable name for the service.

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

◆ $resourcePath

string ilLTIConsumerServiceBase::$resourcePath
protected

cleaned requested resourcePath

Definition at line 60 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 57 of file class.ilLTIConsumerServiceBase.php.

Referenced by ilLTIConsumerGradeService\getResources().

◆ $services

array ilLTIConsumerServiceBase::$services
private

lti services (for further use)

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

◆ $toolproxy

stdClass ilLTIConsumerServiceBase::$toolproxy
private

Tool proxy object for the current service request.

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

◆ $type

stdClass ilLTIConsumerServiceBase::$type
private

LTI type object for the current service request.

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

◆ $typeconfig

array ilLTIConsumerServiceBase::$typeconfig
private

LTI type config array for the current service request.

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

◆ $unsigned

bool ilLTIConsumerServiceBase::$unsigned
protected

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

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

◆ LTI_VERSION2P0

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

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

◆ SERVICE_ENABLED

const ilLTIConsumerServiceBase::SERVICE_ENABLED = 1

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


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