ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilMD5295Format.php
Go to the documentation of this file.
1
<?php
2
/*
3
+-----------------------------------------------------------------------------+
4
| ILIAS open source |
5
+-----------------------------------------------------------------------------+
6
| Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7
| |
8
| This program is free software; you can redistribute it and/or |
9
| modify it under the terms of the GNU General Public License |
10
| as published by the Free Software Foundation; either version 2 |
11
| of the License, or (at your option) any later version. |
12
| |
13
| This program is distributed in the hope that it will be useful, |
14
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
15
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16
| GNU General Public License for more details. |
17
| |
18
| You should have received a copy of the GNU General Public License |
19
| along with this program; if not, write to the Free Software |
20
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21
+-----------------------------------------------------------------------------+
22
*/
23
24
32
include_once
'class.ilMD5295Base.php'
;
33
34
class
ilMD5295Format
extends
ilMD5295Base
35
{
36
// SET/GET
37
public
function
setFormat
($a_format)
38
{
39
$this->format = $a_format;
40
}
41
public
function
getFormat
()
42
{
43
return
$this->format
;
44
}
45
46
public
function
save
()
47
{
48
global
$DIC
;
49
50
$ilDB
= $DIC[
'ilDB'
];
51
52
$fields = $this->
__getFields
();
53
$fields[
'meta_format_id'
] = array(
'integer'
,$next_id =
$ilDB
->nextId(
'il_meta_format'
));
54
55
if
($this->db->insert(
'il_meta_format'
, $fields)) {
56
$this->
setMetaId
($next_id);
57
return
$this->
getMetaId
();
58
}
59
return
false
;
60
}
61
62
public
function
update
()
63
{
64
global
$DIC
;
65
66
$ilDB
= $DIC[
'ilDB'
];
67
68
if
($this->
getMetaId
()) {
69
if
($this->db->update(
70
'il_meta_format'
,
71
$this->__getFields(),
72
array(
"meta_format_id"
=> array(
'integer'
,$this->
getMetaId
()))
73
)) {
74
return
true
;
75
}
76
}
77
return
false
;
78
}
79
80
public
function
delete
()
81
{
82
global
$DIC
;
83
84
$ilDB
= $DIC[
'ilDB'
];
85
86
if
($this->
getMetaId
()) {
87
$query
=
"DELETE FROM il_meta_format "
.
88
"WHERE meta_format_id = "
.
$ilDB
->quote($this->
getMetaId
(),
'integer'
);
89
$res
=
$ilDB
->manipulate(
$query
);
90
91
return
true
;
92
}
93
return
false
;
94
}
95
96
97
public
function
__getFields
()
98
{
99
return
array(
'rbac_id'
=> array(
'integer'
,$this->
getRBACId
()),
100
'obj_id'
=> array(
'integer'
,$this->
getObjId
()),
101
'obj_type'
=> array(
'text'
,$this->
getObjType
()),
102
'format'
=> array(
'text'
,$this->
getFormat
()));
103
}
104
105
public
function
read
()
106
{
107
global
$DIC
;
108
109
$ilDB
= $DIC[
'ilDB'
];
110
111
include_once
'Services/Migration/DBUpdate_5295/classes/class.ilMD5295LanguageItem.php'
;
112
113
if
($this->
getMetaId
()) {
114
$query
=
"SELECT * FROM il_meta_format "
.
115
"WHERE meta_format_id = "
.
$ilDB
->quote($this->
getMetaId
(),
'integer'
);
116
117
$res
= $this->db->query(
$query
);
118
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
119
$this->
setRBACId
($row->rbac_id);
120
$this->
setObjId
($row->obj_id);
121
$this->
setObjType
($row->obj_type);
122
$this->
setFormat
($row->format);
123
}
124
}
125
return
true
;
126
}
127
128
/*
129
* XML Export of all meta data
130
* @param object (xml writer) see class.ilMD52952XML.php
131
*
132
*/
133
public
function
toXML
(&$writer)
134
{
135
if
($this->
getFormat
()) {
136
$writer->xmlElement(
'Format'
, null, $this->
getFormat
());
137
}
138
}
139
140
141
// STATIC
142
public
static
function
_getIds
($a_rbac_id, $a_obj_id)
143
{
144
global
$DIC
;
145
146
$ilDB
= $DIC[
'ilDB'
];
147
148
$query
=
"SELECT meta_format_id FROM il_meta_format "
.
149
"WHERE rbac_id = "
.
$ilDB
->quote($a_rbac_id,
'integer'
) .
" "
.
150
"AND obj_id = "
.
$ilDB
->quote($a_obj_id,
'integer'
);
151
152
$res
=
$ilDB
->query(
$query
);
153
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
154
$ids[] = $row->meta_format_id;
155
}
156
return
$ids ? $ids : array();
157
}
158
}
ilMD5295Base\getMetaId
getMetaId()
Definition:
class.ilMD5295Base.php:125
ilMD5295Base\getObjId
getObjId()
Definition:
class.ilMD5295Base.php:105
ilMD5295Base\getRBACId
getRBACId()
Definition:
class.ilMD5295Base.php:97
ilMD5295Base\getObjType
getObjType()
Definition:
class.ilMD5295Base.php:113
ilMD5295Format\toXML
toXML(&$writer)
Definition:
class.ilMD5295Format.php:133
ilMD5295Format\setFormat
setFormat($a_format)
Definition:
class.ilMD5295Format.php:37
ilMD5295Format\save
save()
Definition:
class.ilMD5295Format.php:46
ilMD5295Base\setObjType
setObjType($a_type)
Definition:
class.ilMD5295Base.php:109
ilMD5295Format\getFormat
getFormat()
Definition:
class.ilMD5295Format.php:41
ilMD5295Format\read
read()
Definition:
class.ilMD5295Format.php:105
ilMD5295Format\__getFields
__getFields()
Definition:
class.ilMD5295Format.php:97
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilMD5295Format\update
update()
Definition:
class.ilMD5295Format.php:62
ilMD5295Base
Definition:
class.ilMD5295Base.php:32
ilMD5295Base\setRBACId
setRBACId($a_id)
Definition:
class.ilMD5295Base.php:93
ilMD5295Base\setObjId
setObjId($a_id)
Definition:
class.ilMD5295Base.php:101
ilMD5295Format
Definition:
class.ilMD5295Format.php:34
$format
$format
Definition:
metadata.php:218
$query
$query
Definition:
proxy_ylocal.php:13
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
$DIC
$DIC
Definition:
xapitoken.php:46
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:11
ilMD5295Base\setMetaId
setMetaId($a_meta_id, $a_read_data=true)
Definition:
class.ilMD5295Base.php:117
ilMD5295Format\_getIds
static _getIds($a_rbac_id, $a_obj_id)
Definition:
class.ilMD5295Format.php:142
Services
Migration
DBUpdate_5295
classes
class.ilMD5295Format.php
Generated on Sun Apr 6 2025 20:01:26 for ILIAS by
1.8.13 (using
Doxyfile
)