@@ -87,11 +87,11 @@ |
||
87 | 87 | protected function takeAttributeFromDOM($attribute) |
88 | 88 | { |
89 | 89 | switch ($attribute->localName) { |
90 | - case 'url': |
|
91 | - $this->_url = $attribute->nodeValue; |
|
92 | - break; |
|
93 | - default: |
|
94 | - parent::takeAttributeFromDOM($attribute); |
|
90 | + case 'url': |
|
91 | + $this->_url = $attribute->nodeValue; |
|
92 | + break; |
|
93 | + default: |
|
94 | + parent::takeAttributeFromDOM($attribute); |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 |
@@ -120,20 +120,20 @@ |
||
120 | 120 | protected function takeAttributeFromDOM($attribute) |
121 | 121 | { |
122 | 122 | switch ($attribute->localName) { |
123 | - case 'type': |
|
124 | - $this->_type = $attribute->nodeValue; |
|
125 | - break; |
|
126 | - case 'lang': |
|
127 | - $this->_lang = $attribute->nodeValue; |
|
128 | - break; |
|
129 | - case 'start': |
|
130 | - $this->_start = $attribute->nodeValue; |
|
131 | - break; |
|
132 | - case 'end': |
|
133 | - $this->_end = $attribute->nodeValue; |
|
134 | - break; |
|
135 | - default: |
|
136 | - parent::takeAttributeFromDOM($attribute); |
|
123 | + case 'type': |
|
124 | + $this->_type = $attribute->nodeValue; |
|
125 | + break; |
|
126 | + case 'lang': |
|
127 | + $this->_lang = $attribute->nodeValue; |
|
128 | + break; |
|
129 | + case 'start': |
|
130 | + $this->_start = $attribute->nodeValue; |
|
131 | + break; |
|
132 | + case 'end': |
|
133 | + $this->_end = $attribute->nodeValue; |
|
134 | + break; |
|
135 | + default: |
|
136 | + parent::takeAttributeFromDOM($attribute); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 |
@@ -97,14 +97,14 @@ |
||
97 | 97 | { |
98 | 98 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; |
99 | 99 | switch ($absoluteNodeName) { |
100 | - case $this->lookupNamespace('media') . ':' . 'group': |
|
101 | - $mediaGroup = new Zend_Gdata_Media_Extension_MediaGroup(); |
|
102 | - $mediaGroup->transferFromDOM($child); |
|
103 | - $this->_mediaGroup = $mediaGroup; |
|
104 | - break; |
|
105 | - default: |
|
106 | - parent::takeChildFromDOM($child); |
|
107 | - break; |
|
100 | + case $this->lookupNamespace('media') . ':' . 'group': |
|
101 | + $mediaGroup = new Zend_Gdata_Media_Extension_MediaGroup(); |
|
102 | + $mediaGroup->transferFromDOM($child); |
|
103 | + $this->_mediaGroup = $mediaGroup; |
|
104 | + break; |
|
105 | + default: |
|
106 | + parent::takeChildFromDOM($child); |
|
107 | + break; |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 |
@@ -110,14 +110,14 @@ |
||
110 | 110 | protected function takeAttributeFromDOM($attribute) |
111 | 111 | { |
112 | 112 | switch ($attribute->localName) { |
113 | - case 'familyName': |
|
114 | - $this->_familyName = $attribute->nodeValue; |
|
115 | - break; |
|
116 | - case 'givenName': |
|
117 | - $this->_givenName = $attribute->nodeValue; |
|
118 | - break; |
|
119 | - default: |
|
120 | - parent::takeAttributeFromDOM($attribute); |
|
113 | + case 'familyName': |
|
114 | + $this->_familyName = $attribute->nodeValue; |
|
115 | + break; |
|
116 | + case 'givenName': |
|
117 | + $this->_givenName = $attribute->nodeValue; |
|
118 | + break; |
|
119 | + default: |
|
120 | + parent::takeAttributeFromDOM($attribute); |
|
121 | 121 | } |
122 | 122 | } |
123 | 123 |
@@ -97,11 +97,11 @@ |
||
97 | 97 | protected function takeAttributeFromDOM($attribute) |
98 | 98 | { |
99 | 99 | switch ($attribute->localName) { |
100 | - case 'name': |
|
101 | - $this->_name = $attribute->nodeValue; |
|
102 | - break; |
|
103 | - default: |
|
104 | - parent::takeAttributeFromDOM($attribute); |
|
100 | + case 'name': |
|
101 | + $this->_name = $attribute->nodeValue; |
|
102 | + break; |
|
103 | + default: |
|
104 | + parent::takeAttributeFromDOM($attribute); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 |
@@ -97,11 +97,11 @@ |
||
97 | 97 | protected function takeAttributeFromDOM($attribute) |
98 | 98 | { |
99 | 99 | switch ($attribute->localName) { |
100 | - case 'limit': |
|
101 | - $this->_limit = $attribute->nodeValue; |
|
102 | - break; |
|
103 | - default: |
|
104 | - parent::takeAttributeFromDOM($attribute); |
|
100 | + case 'limit': |
|
101 | + $this->_limit = $attribute->nodeValue; |
|
102 | + break; |
|
103 | + default: |
|
104 | + parent::takeAttributeFromDOM($attribute); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 |
@@ -192,65 +192,65 @@ |
||
192 | 192 | protected function takeAttributeFromDOM($attribute) |
193 | 193 | { |
194 | 194 | switch ($attribute->localName) { |
195 | - case 'userName': |
|
196 | - $this->_username = $attribute->nodeValue; |
|
197 | - break; |
|
198 | - case 'password': |
|
199 | - $this->_password = $attribute->nodeValue; |
|
200 | - break; |
|
201 | - case 'hashFunctionName': |
|
202 | - $this->_hashFunctionName = $attribute->nodeValue; |
|
203 | - break; |
|
204 | - case 'admin': |
|
205 | - if ($attribute->nodeValue == "true") { |
|
206 | - $this->_admin = true; |
|
207 | - } |
|
208 | - else if ($attribute->nodeValue == "false") { |
|
209 | - $this->_admin = false; |
|
210 | - } |
|
211 | - else { |
|
212 | - require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
|
213 | - throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#admin."); |
|
214 | - } |
|
215 | - break; |
|
216 | - case 'agreedToTerms': |
|
217 | - if ($attribute->nodeValue == "true") { |
|
218 | - $this->_agreedToTerms = true; |
|
219 | - } |
|
220 | - else if ($attribute->nodeValue == "false") { |
|
221 | - $this->_agreedToTerms = false; |
|
222 | - } |
|
223 | - else { |
|
224 | - require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
|
225 | - throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#agreedToTerms."); |
|
226 | - } |
|
227 | - break; |
|
228 | - case 'suspended': |
|
229 | - if ($attribute->nodeValue == "true") { |
|
230 | - $this->_suspended = true; |
|
231 | - } |
|
232 | - else if ($attribute->nodeValue == "false") { |
|
233 | - $this->_suspended = false; |
|
234 | - } |
|
235 | - else { |
|
236 | - require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
|
237 | - throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#suspended."); |
|
238 | - } |
|
239 | - break; |
|
240 | - case 'changePasswordAtNextLogin': |
|
241 | - if ($attribute->nodeValue == "true") { |
|
242 | - $this->_changePasswordAtNextLogin = true; |
|
243 | - } |
|
244 | - else if ($attribute->nodeValue == "false") { |
|
245 | - $this->_changePasswordAtNextLogin = false; |
|
246 | - } |
|
247 | - else { |
|
248 | - require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
|
249 | - throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#changePasswordAtNextLogin."); |
|
250 | - } |
|
251 | - break; |
|
252 | - default: |
|
253 | - parent::takeAttributeFromDOM($attribute); |
|
195 | + case 'userName': |
|
196 | + $this->_username = $attribute->nodeValue; |
|
197 | + break; |
|
198 | + case 'password': |
|
199 | + $this->_password = $attribute->nodeValue; |
|
200 | + break; |
|
201 | + case 'hashFunctionName': |
|
202 | + $this->_hashFunctionName = $attribute->nodeValue; |
|
203 | + break; |
|
204 | + case 'admin': |
|
205 | + if ($attribute->nodeValue == "true") { |
|
206 | + $this->_admin = true; |
|
207 | + } |
|
208 | + else if ($attribute->nodeValue == "false") { |
|
209 | + $this->_admin = false; |
|
210 | + } |
|
211 | + else { |
|
212 | + require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
|
213 | + throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#admin."); |
|
214 | + } |
|
215 | + break; |
|
216 | + case 'agreedToTerms': |
|
217 | + if ($attribute->nodeValue == "true") { |
|
218 | + $this->_agreedToTerms = true; |
|
219 | + } |
|
220 | + else if ($attribute->nodeValue == "false") { |
|
221 | + $this->_agreedToTerms = false; |
|
222 | + } |
|
223 | + else { |
|
224 | + require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
|
225 | + throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#agreedToTerms."); |
|
226 | + } |
|
227 | + break; |
|
228 | + case 'suspended': |
|
229 | + if ($attribute->nodeValue == "true") { |
|
230 | + $this->_suspended = true; |
|
231 | + } |
|
232 | + else if ($attribute->nodeValue == "false") { |
|
233 | + $this->_suspended = false; |
|
234 | + } |
|
235 | + else { |
|
236 | + require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
|
237 | + throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#suspended."); |
|
238 | + } |
|
239 | + break; |
|
240 | + case 'changePasswordAtNextLogin': |
|
241 | + if ($attribute->nodeValue == "true") { |
|
242 | + $this->_changePasswordAtNextLogin = true; |
|
243 | + } |
|
244 | + else if ($attribute->nodeValue == "false") { |
|
245 | + $this->_changePasswordAtNextLogin = false; |
|
246 | + } |
|
247 | + else { |
|
248 | + require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
|
249 | + throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#changePasswordAtNextLogin."); |
|
250 | + } |
|
251 | + break; |
|
252 | + default: |
|
253 | + parent::takeAttributeFromDOM($attribute); |
|
254 | 254 | } |
255 | 255 | } |
256 | 256 |
@@ -206,17 +206,17 @@ |
||
206 | 206 | protected function takeAttributeFromDOM($attribute) |
207 | 207 | { |
208 | 208 | switch ($attribute->localName) { |
209 | - case 'errorCode': |
|
210 | - $this->_errorCode = $attribute->nodeValue; |
|
211 | - break; |
|
212 | - case 'reason': |
|
213 | - $this->_reason = $attribute->nodeValue; |
|
214 | - break; |
|
215 | - case 'invalidInput': |
|
216 | - $this->_invalidInput = $attribute->nodeValue; |
|
217 | - break; |
|
218 | - default: |
|
219 | - parent::takeAttributeFromDOM($attribute); |
|
209 | + case 'errorCode': |
|
210 | + $this->_errorCode = $attribute->nodeValue; |
|
211 | + break; |
|
212 | + case 'reason': |
|
213 | + $this->_reason = $attribute->nodeValue; |
|
214 | + break; |
|
215 | + case 'invalidInput': |
|
216 | + $this->_invalidInput = $attribute->nodeValue; |
|
217 | + break; |
|
218 | + default: |
|
219 | + parent::takeAttributeFromDOM($attribute); |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 |
@@ -70,34 +70,34 @@ discard block |
||
70 | 70 | { |
71 | 71 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; |
72 | 72 | switch ($absoluteNodeName) { |
73 | - case $this->lookupNamespace('atom') . ':' . 'content': |
|
74 | - $content = new Zend_Gdata_App_Extension_Content(); |
|
75 | - $content->transferFromDOM($child); |
|
76 | - $this->_content = $content; |
|
77 | - break; |
|
78 | - case $this->lookupNamespace('atom') . ':' . 'published': |
|
79 | - $published = new Zend_Gdata_App_Extension_Published(); |
|
80 | - $published->transferFromDOM($child); |
|
81 | - $this->_published = $published; |
|
82 | - break; |
|
83 | - case $this->lookupNamespace('atom') . ':' . 'source': |
|
84 | - $source = new Zend_Gdata_App_Extension_Source(); |
|
85 | - $source->transferFromDOM($child); |
|
86 | - $this->_source = $source; |
|
87 | - break; |
|
88 | - case $this->lookupNamespace('atom') . ':' . 'summary': |
|
89 | - $summary = new Zend_Gdata_App_Extension_Summary(); |
|
90 | - $summary->transferFromDOM($child); |
|
91 | - $this->_summary = $summary; |
|
92 | - break; |
|
93 | - case $this->lookupNamespace('app') . ':' . 'control': |
|
94 | - $control = new Zend_Gdata_App_Extension_Control(); |
|
95 | - $control->transferFromDOM($child); |
|
96 | - $this->_control = $control; |
|
97 | - break; |
|
98 | - default: |
|
99 | - parent::takeChildFromDOM($child); |
|
100 | - break; |
|
73 | + case $this->lookupNamespace('atom') . ':' . 'content': |
|
74 | + $content = new Zend_Gdata_App_Extension_Content(); |
|
75 | + $content->transferFromDOM($child); |
|
76 | + $this->_content = $content; |
|
77 | + break; |
|
78 | + case $this->lookupNamespace('atom') . ':' . 'published': |
|
79 | + $published = new Zend_Gdata_App_Extension_Published(); |
|
80 | + $published->transferFromDOM($child); |
|
81 | + $this->_published = $published; |
|
82 | + break; |
|
83 | + case $this->lookupNamespace('atom') . ':' . 'source': |
|
84 | + $source = new Zend_Gdata_App_Extension_Source(); |
|
85 | + $source->transferFromDOM($child); |
|
86 | + $this->_source = $source; |
|
87 | + break; |
|
88 | + case $this->lookupNamespace('atom') . ':' . 'summary': |
|
89 | + $summary = new Zend_Gdata_App_Extension_Summary(); |
|
90 | + $summary->transferFromDOM($child); |
|
91 | + $this->_summary = $summary; |
|
92 | + break; |
|
93 | + case $this->lookupNamespace('app') . ':' . 'control': |
|
94 | + $control = new Zend_Gdata_App_Extension_Control(); |
|
95 | + $control->transferFromDOM($child); |
|
96 | + $this->_control = $control; |
|
97 | + break; |
|
98 | + default: |
|
99 | + parent::takeChildFromDOM($child); |
|
100 | + break; |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
@@ -111,21 +111,21 @@ discard block |
||
111 | 111 | protected function takeAttributeFromDOM($attribute) |
112 | 112 | { |
113 | 113 | switch ($attribute->localName) { |
114 | - case 'etag': |
|
115 | - // ETags are special, since they can be conveyed by either the |
|
116 | - // HTTP ETag header or as an XML attribute. |
|
117 | - $etag = $attribute->nodeValue; |
|
118 | - if ($this->_etag === null) { |
|
119 | - $this->_etag = $etag; |
|
120 | - } |
|
121 | - elseif ($this->_etag != $etag) { |
|
122 | - require_once('Zend/Gdata/App/IOException.php'); |
|
123 | - throw new Zend_Gdata_App_IOException("ETag mismatch"); |
|
124 | - } |
|
125 | - break; |
|
126 | - default: |
|
127 | - parent::takeAttributeFromDOM($attribute); |
|
128 | - break; |
|
114 | + case 'etag': |
|
115 | + // ETags are special, since they can be conveyed by either the |
|
116 | + // HTTP ETag header or as an XML attribute. |
|
117 | + $etag = $attribute->nodeValue; |
|
118 | + if ($this->_etag === null) { |
|
119 | + $this->_etag = $etag; |
|
120 | + } |
|
121 | + elseif ($this->_etag != $etag) { |
|
122 | + require_once('Zend/Gdata/App/IOException.php'); |
|
123 | + throw new Zend_Gdata_App_IOException("ETag mismatch"); |
|
124 | + } |
|
125 | + break; |
|
126 | + default: |
|
127 | + parent::takeAttributeFromDOM($attribute); |
|
128 | + break; |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 |