|
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 96 of file class.ilCmiXapiAbstractRequest.php.
Referenced by ilCmiXapiLaunchGUI\CMI5preLaunch(), and ilXapiStatementEvaluation\sendSatisfiedStatement().
102 if ($encoding ===
false) {
103 $encoder =
function ($str) {
106 } elseif ($encoding === PHP_QUERY_RFC3986) {
107 $encoder =
'rawurlencode';
108 } elseif ($encoding === PHP_QUERY_RFC1738) {
109 $encoder =
'urlencode';
111 throw new \InvalidArgumentException(
'Invalid type');
115 foreach ($params as $k => $v) {
120 $qs .=
'=' . $encoder($v);
124 foreach ($v as $vv) {
127 $qs .=
'=' . $encoder($vv);
133 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: