19declare(strict_types=1);
44 self::PURPOSE_PURPOSES_TABLE,
46 'purpose_id' => [
'int',
$ilDB->nextId(self::PURPOSE_PURPOSES_TABLE)],
48 'purpose' => [
'text', $purpose],
58 self::PURPOSE_MAP_TABLE,
60 'map_id' => [
'int',
$ilDB->nextId(self::PURPOSE_MAP_TABLE)],
62 'purpose' => [
'text', $purpose],
63 'preferred' => [
'text', $preferred],
64 'selected' => [
'text', $preferred]
74 $ilDB->manipulate(
"DELETE FROM " . self::PURPOSE_PURPOSES_TABLE .
75 " WHERE service = " .
$ilDB->quote(
$service,
"text") .
" AND purpose = " .
$ilDB->quote($purpose,
"text"));
83 $ilDB->manipulate(
"DELETE FROM " . self::PURPOSE_MAP_TABLE .
84 " WHERE service = " .
$ilDB->quote(
$service,
"text") .
" AND purpose = " .
$ilDB->quote($purpose,
"text") .
85 " AND preferred = " .
$ilDB->quote($preferred,
"text"));
93 $ilDB->manipulate(
"DELETE FROM " . self::PURPOSE_PURPOSES_TABLE .
" WHERE service = " .
$ilDB->quote(
104 $query =
'SELECT count(*) num FROM ' . self::PURPOSE_PURPOSES_TABLE .
' WHERE service = '
105 .
$ilDB->quote(
$service,
'text') .
' AND purpose = ' .
$ilDB->quote($purpose,
'text');
107 $row =
$ilDB->fetchAssoc($result);
109 return is_array($row) && (
int) $row[
'num'] !== 0;
121 $query =
'SELECT purpose FROM ' . self::PURPOSE_PURPOSES_TABLE .
' WHERE service = ' .
$ilDB->quote(
127 while ($row =
$ilDB->fetchAssoc($result)) {
128 $purposes[] = $row[
'purpose'];
141 $query =
'SELECT service FROM ' . self::PURPOSE_PURPOSES_TABLE .
' GROUP BY service';
144 while ($row =
$ilDB->fetchAssoc($result)) {
145 $services[] = $row[
'service'];
154 $query =
'SELECT service, purpose FROM ' . self::PURPOSE_PURPOSES_TABLE .
' GROUP BY service, purpose having count(*) > 1';
156 $row =
$ilDB->fetchAssoc($result);
158 return is_array($row) && !empty($row);
165 $query =
'SELECT service, purpose FROM ' . self::PURPOSE_PURPOSES_TABLE .
' GROUP BY service, purpose having count(*) > 1';
167 while ($row =
$ilDB->fetchAssoc($result)) {
172 $query =
'SELECT service, purpose, preferred FROM ' . self::PURPOSE_MAP_TABLE .
' GROUP BY service, purpose, preferred having count(*) > 1';
175 while ($row =
$ilDB->fetchAssoc($result)) {
186 if (!self::isPurposeRegistered(
$service, $purpose)) {
197 self::RENDERER_TABLE,
199 'renderer_id' => [
'int',
$ilDB->nextId(self::RENDERER_TABLE)],
200 'renderer' => [
'text', $renderer],
201 'path' => [
'text',
$path]
212 self::RENDERER_AVAIL_TABLE,
214 'availability_id' => [
'int',
$ilDB->nextId(self::RENDERER_AVAIL_TABLE)],
216 'purpose' => [
'text', $purpose],
217 'renderer' => [
'text', $renderer]
static addPurpose(string $service, string $purpose)
static registerRenderer(string $renderer, string $path)
static registerRendererAvailability(string $renderer, string $service, string $purpose)
static unregisterPurpose(string $service, string $purpose)
static flushPurposes(string $service)
static getPurposesByService(string $service)
static unregisterPreferred(string $service, string $purpose, string $preferred)
static registerPurpose(string $service, string $purpose, string $preferred)
static checkForMultipleServiceAndPurposeCombination()
static addPreferred(string $service, string $purpose, string $preferred)
static updateFromXML(string $service, string $purpose, string $preferred)
const RENDERER_AVAIL_TABLE
static isPurposeRegistered(string $service, string $purpose)
const PURPOSE_PURPOSES_TABLE
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts