ILIAS
release_4-4 Revision
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
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
k
l
m
n
o
p
q
r
s
t
u
v
w
y
+
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
k
l
m
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
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.ilContainerReferenceXmlWriter.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
include_once
"./Services/Xml/classes/class.ilXmlWriter.php"
;
5
12
class
ilContainerReferenceXmlWriter
extends
ilXmlWriter
13
{
14
const
MODE_SOAP
= 1;
15
const
MODE_EXPORT
= 2;
16
17
private
$mode
= self::MODE_SOAP;
18
private
$xml
;
19
private
$ref
;
20
28
public
function
__construct
(
ilContainerReference
$ref
= null)
29
{
30
parent::__construct();
31
$this->ref =
$ref
;
32
}
33
38
public
function
setMode
($a_mode)
39
{
40
$this->mode = $a_mode;
41
}
42
47
public
function
getMode
()
48
{
49
return
$this->mode
;
50
}
51
56
public
function
getReference
()
57
{
58
return
$this->ref
;
59
}
60
61
65
public
function
export
($a_with_header =
true
)
66
{
67
if
($this->
getMode
() == self::MODE_EXPORT)
68
{
69
if
($a_with_header)
70
{
71
$this->
buildHeader
();
72
}
73
$this->
buildReference
();
74
$this->
buildTarget
();
75
$this->
buildTitle
();
76
$this->
buildFooter
();
77
}
78
}
79
84
public
function
getXml
()
85
{
86
return
$this->
xmlDumpMem
(
false
);
87
}
88
94
protected
function
buildHeader
()
95
{
96
global
$ilSetting
;
97
98
$this->
xmlSetDtdDef
(
"<!DOCTYPE container reference PUBLIC \"-//ILIAS//DTD Group//EN\" \""
.ILIAS_HTTP_PATH.
"/xml/ilias_container_reference_4_3.dtd\">"
);
99
$this->
xmlSetGenCmt
(
"Export of ILIAS container reference "
. $this->
getReference
()->getId().
" of installation "
.$ilSetting->get(
'inst_id'
).
"."
);
100
$this->
xmlHeader
();
101
102
return
true
;
103
}
104
108
protected
function
buildTarget
()
109
{
110
$this->
xmlElement
(
'Target'
, array(
'id'
=> $this->
getReference
()->getTargetId()));
111
}
112
116
protected
function
buildTitle
()
117
{
118
$title =
''
;
119
if
($this->
getReference
()->getTitleType() ==
ilContainerReference::TITLE_TYPE_CUSTOM
)
120
{
121
$title = $this->
getReference
()->getTitle();
122
}
123
124
$this->
xmlElement
(
125
'Title'
,
126
array(
127
'type'
=> $this->
getReference
()->getTitleType()
128
),
129
$title
130
);
131
}
132
136
protected
function
buildReference
()
137
{
138
$this->
xmlStartTag
(
'ContainerReference'
);
139
}
140
144
protected
function
buildFooter
()
145
{
146
$this->
xmlEndTag
(
'ContainerReference'
);
147
}
148
}
149
?>
ilContainerReference
Definition:
class.ilContainerReference.php:33
ilContainerReferenceXmlWriter\setMode
setMode($a_mode)
Set export mode.
Definition:
class.ilContainerReferenceXmlWriter.php:38
ilXmlWriter\xmlSetGenCmt
xmlSetGenCmt($genCmt)
Sets generated comment.
Definition:
class.ilXmlWriter.php:121
ilContainerReferenceXmlWriter\buildReference
buildReference()
Build category xml.
Definition:
class.ilContainerReferenceXmlWriter.php:136
ilXmlWriter\xmlSetDtdDef
xmlSetDtdDef($dtdDef)
Sets dtd definition.
Definition:
class.ilXmlWriter.php:101
ilXmlWriter\xmlStartTag
xmlStartTag($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
Writes a starttag.
Definition:
class.ilXmlWriter.php:332
ilContainerReferenceXmlWriter\$xml
$xml
Definition:
class.ilContainerReferenceXmlWriter.php:18
ilContainerReferenceXmlWriter\buildTitle
buildTitle()
Build title element.
Definition:
class.ilContainerReferenceXmlWriter.php:116
ilContainerReferenceXmlWriter\buildTarget
buildTarget()
Build target element.
Definition:
class.ilContainerReferenceXmlWriter.php:108
ilXmlWriter
XML writer class.
Definition:
class.ilXmlWriter.php:17
ilXmlWriter\xmlElement
xmlElement($tag, $attrs=NULL, $data=Null, $encode=TRUE, $escape=TRUE)
Writes a basic element (no children, just textual content)
Definition:
class.ilXmlWriter.php:423
ilContainerReferenceXmlWriter\$mode
$mode
Definition:
class.ilContainerReferenceXmlWriter.php:17
ilContainerReferenceXmlWriter\getXml
getXml()
get XML
Definition:
class.ilContainerReferenceXmlWriter.php:84
ilContainerReferenceXmlWriter\getMode
getMode()
get export mode
Definition:
class.ilContainerReferenceXmlWriter.php:47
ilXmlWriter\xmlEndTag
xmlEndTag($tag)
Writes an endtag.
Definition:
class.ilXmlWriter.php:375
ilContainerReferenceXmlWriter\buildHeader
buildHeader()
Build xml header <type> $ilSetting.
Definition:
class.ilContainerReferenceXmlWriter.php:94
ilXmlWriter\xmlHeader
xmlHeader()
Writes xml header public.
Definition:
class.ilXmlWriter.php:297
ilContainerReferenceXmlWriter\MODE_EXPORT
const MODE_EXPORT
Definition:
class.ilContainerReferenceXmlWriter.php:15
ilContainerReferenceXmlWriter\__construct
__construct(ilContainerReference $ref=null)
constructor
Definition:
class.ilContainerReferenceXmlWriter.php:28
ilContainerReferenceXmlWriter\buildFooter
buildFooter()
Add footer elements.
Definition:
class.ilContainerReferenceXmlWriter.php:144
ilContainerReferenceXmlWriter\getReference
getReference()
Get category object.
Definition:
class.ilContainerReferenceXmlWriter.php:56
ilContainerReference\TITLE_TYPE_CUSTOM
const TITLE_TYPE_CUSTOM
Definition:
class.ilContainerReference.php:36
ilContainerReferenceXmlWriter\$ref
$ref
Definition:
class.ilContainerReferenceXmlWriter.php:19
ilContainerReferenceXmlWriter\MODE_SOAP
const MODE_SOAP
Definition:
class.ilContainerReferenceXmlWriter.php:14
$ilSetting
global $ilSetting
Definition:
privfeed.php:40
ilContainerReferenceXmlWriter\export
export($a_with_header=true)
Start wrting xml.
Definition:
class.ilContainerReferenceXmlWriter.php:65
ilXmlWriter\xmlDumpMem
xmlDumpMem($format=TRUE)
Returns xml document from memory.
Definition:
class.ilXmlWriter.php:487
ilContainerReferenceXmlWriter
Class for container reference export.
Definition:
class.ilContainerReferenceXmlWriter.php:12
Services
ContainerReference
classes
class.ilContainerReferenceXmlWriter.php
Generated on Mon Dec 21 2020 19:01:12 for ILIAS by
1.8.13 (using
Doxyfile
)