00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 class eZSchemaElement
00042 {
00043
00044
00045
00046 function eZSchemaElement()
00047 {
00048 }
00049
00050
00051
00052
00053 function setName( $name )
00054 {
00055 $this->Name = $name;
00056 }
00057
00058
00059
00060
00061 function name()
00062 {
00063 return $this->Name;
00064 }
00065
00066
00067
00068
00069 function setType( $type )
00070 {
00071 if ( $type == "complexType" )
00072 $this->Type = "complexType";
00073 else if ( $type == "reference" )
00074 $this->Type = "reference";
00075 else
00076 $this->Type = "simpleType";
00077 }
00078
00079
00080
00081
00082 function type()
00083 {
00084 return $this->Type;
00085 }
00086
00087
00088
00089
00090 function setDataType( $type )
00091 {
00092 $this->DataType = $type;
00093 }
00094
00095
00096
00097
00098 function dataType()
00099 {
00100 return $this->DataType;
00101 }
00102
00103
00104
00105
00106 function isComplex()
00107 {
00108 if ( $this->Type == "complexType" )
00109 return true;
00110 else
00111 return false;
00112 }
00113
00114
00115
00116
00117 function isReference()
00118 {
00119 if ( $this->Type == "reference" )
00120 return true;
00121 else
00122 return false;
00123 }
00124
00125
00126
00127
00128 function isSimple()
00129 {
00130 if ( $this->Type == "simpleType" )
00131 return true;
00132 else
00133 return false;
00134 }
00135
00136
00137
00138
00139 function setMinOccurs( $value )
00140 {
00141 $this->MinOccurs = $value;
00142 }
00143
00144
00145
00146
00147 function minOccurs()
00148 {
00149 return $this->MinOccurs;
00150 }
00151
00152
00153
00154
00155 function setMaxOccurs( $value )
00156 {
00157 $this->MaxOccurs = $value;
00158 }
00159
00160
00161
00162
00163 function maxOccurs()
00164 {
00165 return $this->MaxOccurs;
00166 }
00167
00168
00169
00170
00171 function children()
00172 {
00173 return $this->Children;
00174 }
00175
00176
00177
00178
00179 function setReference( $value )
00180 {
00181 $this->Reference = $value;
00182 $this->Type = "reference";
00183 }
00184
00185
00186
00187
00188 function setParent( $element )
00189 {
00190 $this->ParentElement = $element;
00191 }
00192
00193
00194
00195
00196 function parentElement()
00197 {
00198 return $this->ParentElement;
00199 }
00200
00201
00202
00203
00204 function setNext( $element )
00205 {
00206 $this->NextElement = $element;
00207 }
00208
00209
00210
00211
00212 function nextElement()
00213 {
00214 return $this->NextElement;
00215 }
00216
00217
00218 var $Reference = false;
00219
00220
00221 var $Name = "";
00222
00223
00224 var $MinOccurs = 1;
00225
00226
00227 var $MaxOccurs = 1;
00228
00229
00230 var $Type = "simpleType";
00231
00232
00233 var $NextElement = false;
00234
00235
00236 var $DataType = false;
00237
00238
00239 var $ParentElement = false;
00240
00241
00242 var $Children = array();
00243 }
00244
00245 ?>