|
static | checkResponse ($response, &$body, $allowedStatus=[200, 204]) |
|
static | buildQuery (array $params, $encoding=PHP_QUERY_RFC3986) |
|
◆ __construct()
ilCmiXapiAbstractRequest::__construct |
( |
string |
$basicAuth | ) |
|
◆ buildQuery()
static ilCmiXapiAbstractRequest::buildQuery |
( |
array |
$params, |
|
|
|
$encoding = PHP_QUERY_RFC3986 |
|
) |
| |
|
static |
Definition at line 87 of file class.ilCmiXapiAbstractRequest.php.
Referenced by ilCmiXapiLaunchGUI\CMI5preLaunch(), and ilXapiStatementEvaluation\sendSatisfiedStatement().
93 if ($encoding ===
false) {
94 $encoder =
function ($str) {
97 } elseif ($encoding === PHP_QUERY_RFC3986) {
98 $encoder =
'rawurlencode';
99 } elseif ($encoding === PHP_QUERY_RFC1738) {
100 $encoder =
'urlencode';
102 throw new \InvalidArgumentException(
'Invalid type');
106 foreach ($params as $k => $v) {
111 $qs .=
'=' . $encoder($v);
115 foreach ($v as $vv) {
118 $qs .=
'=' . $encoder($vv);
124 return $qs ? (string) substr($qs, 0, -1) :
'';
◆ checkResponse()
static ilCmiXapiAbstractRequest::checkResponse |
( |
|
$response, |
|
|
& |
$body, |
|
|
|
$allowedStatus = [200 , |
|
|
204] |
|
|
) |
| |
|
static |
◆ sendRequest()
ilCmiXapiAbstractRequest::sendRequest |
( |
|
$url | ) |
|
|
protected |
◆ $basicAuth
ilCmiXapiAbstractRequest::$basicAuth |
|
private |
◆ $plugin
ilCmiXapiAbstractRequest::$plugin = false |
|
static |
The documentation for this class was generated from the following file: