LTI Integration Library 4.10.3
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
AssignmentGrade.php
1<?php
2
3namespace ceLTIc\LTI\Service;
4
6
15{
16
24 public function __construct($platform, $endpoint, $path = '')
25 {
26 $endpoint = self::addPath($endpoint, $path);
27 parent::__construct($platform, $endpoint);
28 }
29
38 private static function addPath($endpoint, $path)
39 {
40 if (strpos($endpoint, '?') === false) {
41 if (substr($endpoint, -strlen($path)) !== $path) {
42 $endpoint .= $path;
43 }
44 } elseif (strpos($endpoint, "{$path}?") === false) {
45 $endpoint = str_replace('?', "{$path}?", $endpoint);
46 }
47
48 return $endpoint;
49 }
50
51}
Class to represent a platform.
Definition Platform.php:18
Class to implement the Assignment and Grade services.
__construct($platform, $endpoint, $path='')
Class constructor.
Class to implement a service.
Definition Service.php:19
$endpoint
Service endpoint.
Definition Service.php:33