LTI Integration Library 4.10.3
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
ToolConsumer.php
1<?php
2
3namespace ceLTIc\LTI;
4
6
18{
19
27 public function __construct($key = null, $dataConnector = null, $autoEnable = false)
28 {
29 parent::__construct($dataConnector);
30 $platform = Platform::fromConsumerKey($key, $dataConnector, $autoEnable);
31 $this->setKey($key);
32 $this->setRecordId($platform->getRecordId());
33 foreach (get_object_vars($platform) as $key => $value) {
34 $this->$key = $value;
35 }
36 Util::logDebug('Class ceLTIc\LTI\ToolConsumer has been deprecated; please use ceLTIc\LTI\Platform::fromConsumerKey instead.',
37 true);
38 }
39
40}
Class to represent a platform.
Definition Platform.php:18
static fromConsumerKey($key=null, $dataConnector=null, $autoEnable=false)
Load the platform from the database by its consumer key.
Definition Platform.php:486
$dataConnector
Data connector object.
Definition System.php:71
setKey($key)
Set the consumer key.
Definition System.php:258
setRecordId($id)
Sets the system record ID.
Definition System.php:238
Class to represent a tool consumer.
__construct($key=null, $dataConnector=null, $autoEnable=false)
Class constructor.
static logDebug($message, $showSource=false)
Log a debug message.
Definition Util.php:274