@@ -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 |
@@ -204,11 +204,9 @@ discard block |
||
204 | 204 | case 'admin': |
205 | 205 | if ($attribute->nodeValue == "true") { |
206 | 206 | $this->_admin = true; |
207 | - } |
|
208 | - else if ($attribute->nodeValue == "false") { |
|
207 | + } else if ($attribute->nodeValue == "false") { |
|
209 | 208 | $this->_admin = false; |
210 | - } |
|
211 | - else { |
|
209 | + } else { |
|
212 | 210 | require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
213 | 211 | throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#admin."); |
214 | 212 | } |
@@ -216,11 +214,9 @@ discard block |
||
216 | 214 | case 'agreedToTerms': |
217 | 215 | if ($attribute->nodeValue == "true") { |
218 | 216 | $this->_agreedToTerms = true; |
219 | - } |
|
220 | - else if ($attribute->nodeValue == "false") { |
|
217 | + } else if ($attribute->nodeValue == "false") { |
|
221 | 218 | $this->_agreedToTerms = false; |
222 | - } |
|
223 | - else { |
|
219 | + } else { |
|
224 | 220 | require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
225 | 221 | throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#agreedToTerms."); |
226 | 222 | } |
@@ -228,11 +224,9 @@ discard block |
||
228 | 224 | case 'suspended': |
229 | 225 | if ($attribute->nodeValue == "true") { |
230 | 226 | $this->_suspended = true; |
231 | - } |
|
232 | - else if ($attribute->nodeValue == "false") { |
|
227 | + } else if ($attribute->nodeValue == "false") { |
|
233 | 228 | $this->_suspended = false; |
234 | - } |
|
235 | - else { |
|
229 | + } else { |
|
236 | 230 | require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
237 | 231 | throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#suspended."); |
238 | 232 | } |
@@ -240,11 +234,9 @@ discard block |
||
240 | 234 | case 'changePasswordAtNextLogin': |
241 | 235 | if ($attribute->nodeValue == "true") { |
242 | 236 | $this->_changePasswordAtNextLogin = true; |
243 | - } |
|
244 | - else if ($attribute->nodeValue == "false") { |
|
237 | + } else if ($attribute->nodeValue == "false") { |
|
245 | 238 | $this->_changePasswordAtNextLogin = false; |
246 | - } |
|
247 | - else { |
|
239 | + } else { |
|
248 | 240 | require_once('Zend/Gdata/App/InvalidArgumentException.php'); |
249 | 241 | throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#changePasswordAtNextLogin."); |
250 | 242 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | * @param integer $value The new value for the error code. |
90 | 90 | */ |
91 | 91 | public function setErrorCode($value) { |
92 | - $this->_errorCode = $value; |
|
92 | + $this->_errorCode = $value; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | * @param string $value The reason this exception occurred. |
140 | 140 | */ |
141 | 141 | public function setReason($value) { |
142 | - $this->_reason = $value; |
|
142 | + $this->_reason = $value; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * @return string The reason this exception occurred. |
150 | 150 | */ |
151 | 151 | public function getReason() { |
152 | - return $this->_reason; |
|
152 | + return $this->_reason; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | /** |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * @param string $value The invalid input that triggered this exception. |
160 | 160 | */ |
161 | 161 | public function setInvalidInput($value) { |
162 | - $this->_invalidInput = $value; |
|
162 | + $this->_invalidInput = $value; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * @return string The reason this exception occurred. |
170 | 170 | */ |
171 | 171 | public function getInvalidInput() { |
172 | - return $this->_invalidInput; |
|
172 | + return $this->_invalidInput; |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
@@ -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 |
@@ -80,10 +80,10 @@ |
||
80 | 80 | * @param string $value The nickname to filter search results by, or null |
81 | 81 | * to disable. |
82 | 82 | */ |
83 | - public function setNickname($value) |
|
84 | - { |
|
85 | - $this->_nickname = $value; |
|
86 | - } |
|
83 | + public function setNickname($value) |
|
84 | + { |
|
85 | + $this->_nickname = $value; |
|
86 | + } |
|
87 | 87 | |
88 | 88 | /** |
89 | 89 | * Get the nickname to query for. If no nickname is set, null will be |
@@ -110,8 +110,7 @@ |
||
110 | 110 | { |
111 | 111 | if ($value !== null) { |
112 | 112 | $this->_params['username'] = $value; |
113 | - } |
|
114 | - else { |
|
113 | + } else { |
|
115 | 114 | unset($this->_params['username']); |
116 | 115 | } |
117 | 116 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | public function setDirectOnly($value) |
138 | 138 | { |
139 | 139 | if ($value !== null) { |
140 | - if($value == true) { |
|
140 | + if ($value == true) { |
|
141 | 141 | $this->_params['directOnly'] = 'true'; |
142 | 142 | } else { |
143 | 143 | $this->_params['directOnly'] = 'false'; |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | { |
157 | 157 | if (array_key_exists('directOnly', $this->_params)) { |
158 | 158 | |
159 | - if($this->_params['directOnly'] == 'true') { |
|
159 | + if ($this->_params['directOnly'] == 'true') { |
|
160 | 160 | return true; |
161 | 161 | } else { |
162 | 162 | return false; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $uri .= '/' . $this->_groupId; |
216 | 216 | } |
217 | 217 | |
218 | - if(array_key_exists('member', $this->_params)) { |
|
218 | + if (array_key_exists('member', $this->_params)) { |
|
219 | 219 | $uri .= '/'; |
220 | 220 | } |
221 | 221 |
@@ -106,8 +106,7 @@ |
||
106 | 106 | { |
107 | 107 | if ($value !== null) { |
108 | 108 | $this->_params['member'] = $value; |
109 | - } |
|
110 | - else { |
|
109 | + } else { |
|
111 | 110 | unset($this->_params['member']); |
112 | 111 | } |
113 | 112 | } |
@@ -77,10 +77,10 @@ |
||
77 | 77 | * @param string $value The email list name to filter search results by, |
78 | 78 | * or null to disable. |
79 | 79 | */ |
80 | - public function setEmailListName($value) |
|
81 | - { |
|
82 | - $this->_emailListName = $value; |
|
83 | - } |
|
80 | + public function setEmailListName($value) |
|
81 | + { |
|
82 | + $this->_emailListName = $value; |
|
83 | + } |
|
84 | 84 | |
85 | 85 | /** |
86 | 86 | * Get the email list name to query for. If no name is set, null will be |
@@ -110,8 +110,7 @@ |
||
110 | 110 | { |
111 | 111 | if ($value !== null) { |
112 | 112 | $this->_params['recipient'] = $value; |
113 | - } |
|
114 | - else { |
|
113 | + } else { |
|
115 | 114 | unset($this->_params['recipient']); |
116 | 115 | } |
117 | 116 | } |
@@ -77,10 +77,10 @@ |
||
77 | 77 | * @param string $value The email list name to filter search results by, |
78 | 78 | * or null to disable. |
79 | 79 | */ |
80 | - public function setEmailListName($value) |
|
81 | - { |
|
82 | - $this->_emailListName = $value; |
|
83 | - } |
|
80 | + public function setEmailListName($value) |
|
81 | + { |
|
82 | + $this->_emailListName = $value; |
|
83 | + } |
|
84 | 84 | |
85 | 85 | /** |
86 | 86 | * Get the email list name to query for. If no name is set, null will be |
@@ -59,8 +59,8 @@ |
||
59 | 59 | if ($majorVersion >= 2) { |
60 | 60 | if ($this->_etag != null) { |
61 | 61 | $element->setAttributeNS($this->lookupNamespace('gd'), |
62 | - 'gd:etag', |
|
63 | - $this->_etag); |
|
62 | + 'gd:etag', |
|
63 | + $this->_etag); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | return $element; |
@@ -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 |
@@ -170,8 +170,7 @@ |
||
170 | 170 | $etag = $attribute->nodeValue; |
171 | 171 | if ($this->_etag === null) { |
172 | 172 | $this->_etag = $etag; |
173 | - } |
|
174 | - elseif ($this->_etag != $etag) { |
|
173 | + } elseif ($this->_etag != $etag) { |
|
175 | 174 | require_once('Zend/Gdata/App/IOException.php'); |
176 | 175 | throw new Zend_Gdata_App_IOException("ETag mismatch"); |
177 | 176 | } |
@@ -295,7 +295,7 @@ |
||
295 | 295 | */ |
296 | 296 | public function updateCell($row, $col, $inputValue, $key, $wkshtId = 'default') |
297 | 297 | { |
298 | - $cell = 'R'.$row.'C'.$col; |
|
298 | + $cell = 'R' . $row . 'C' . $col; |
|
299 | 299 | |
300 | 300 | $query = new Zend_Gdata_Spreadsheets_CellQuery(); |
301 | 301 | $query->setSpreadsheetKey($key); |