97 ### ToolConsumer methods 110 $consumer->secret =
'secret';
111 $consumer->enabled =
true;
113 $consumer->created = $now;
114 $consumer->updated = $now;
130 $consumer->updated = time();
146 $consumer->initialize();
166 ### ToolProxy methods 180 $toolProxy->created = $now;
181 $toolProxy->updated = $now;
197 $toolProxy->updated = time();
213 $toolProxy->initialize();
274 ### ResourceLink methods 288 $resourceLink->created = $now;
289 $resourceLink->updated = $now;
305 $resourceLink->updated = time();
321 $resourceLink->initialize();
361 ### ConsumerNonce methods 392 ### ResourceLinkShareKey methods 452 $user->created = $now;
453 $user->updated = $now;
469 $user->updated = time();
535 if (!is_null(
$db) && empty(
$type)) {
536 if (is_object(
$db)) {
541 if ((
$type ===
'pdo') && (
$db->getAttribute(PDO::ATTR_DRIVER_NAME) ===
'sqlite')) {
545 $type =
"DataConnector_{$type}";
547 $type =
'DataConnector';
549 $type =
"\\IMSGlobal\\LTI\\ToolProvider\\DataConnector\\{$type}";
552 return $dataConnector;
568 $chars =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
571 $charsLength = strlen($chars) - 1;
573 for (
$i = 1 ;
$i <= $length;
$i++) {
574 $value .= $chars[rand(0, $charsLength)];
591 static function quoted($value, $addQuotes =
true)
594 if (is_null($value)) {
597 $value = str_replace(
'\'',
'\'\
'', $value);
599 $value =
"'{$value}'";
hash(StreamInterface $stream, $algo, $rawOutput=false)
Calculate a hash of a Stream.