@@ -63,55 +63,55 @@ |
||
63 | 63 | public function setFeedType($feedType, $videoId = null, $entry = null) |
64 | 64 | { |
65 | 65 | switch ($feedType) { |
66 | - case 'top rated': |
|
67 | - $this->_url = Zend_Gdata_YouTube::STANDARD_TOP_RATED_URI; |
|
68 | - break; |
|
69 | - case 'most viewed': |
|
70 | - $this->_url = Zend_Gdata_YouTube::STANDARD_MOST_VIEWED_URI; |
|
71 | - break; |
|
72 | - case 'recently featured': |
|
73 | - $this->_url = Zend_Gdata_YouTube::STANDARD_RECENTLY_FEATURED_URI; |
|
74 | - break; |
|
75 | - case 'mobile': |
|
76 | - $this->_url = Zend_Gdata_YouTube::STANDARD_WATCH_ON_MOBILE_URI; |
|
77 | - break; |
|
78 | - case 'related': |
|
79 | - if ($videoId === null) { |
|
80 | - require_once 'Zend/Gdata/App/InvalidArgumentException.php'; |
|
81 | - throw new Zend_Gdata_App_InvalidArgumentException( |
|
82 | - 'Video ID must be set for feed of type: ' . $feedType); |
|
83 | - } else { |
|
84 | - $this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' . $videoId . |
|
85 | - '/related'; |
|
86 | - } |
|
87 | - break; |
|
88 | - case 'responses': |
|
89 | - if ($videoId === null) { |
|
90 | - require_once 'Zend/Gdata/App/InvalidArgumentException.php'; |
|
91 | - throw new Zend_Gdata_App_Exception( |
|
92 | - 'Video ID must be set for feed of type: ' . $feedType); |
|
93 | - } else { |
|
94 | - $this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' . $videoId . |
|
95 | - '/responses'; |
|
96 | - } |
|
97 | - break; |
|
98 | - case 'comments': |
|
99 | - if ($videoId === null) { |
|
100 | - require_once 'Zend/Gdata/App/InvalidArgumentException.php'; |
|
101 | - throw new Zend_Gdata_App_Exception( |
|
102 | - 'Video ID must be set for feed of type: ' . $feedType); |
|
103 | - } else { |
|
104 | - $this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' . |
|
105 | - $videoId . '/comments'; |
|
106 | - if ($entry !== null) { |
|
107 | - $this->_url .= '/' . $entry; |
|
66 | + case 'top rated': |
|
67 | + $this->_url = Zend_Gdata_YouTube::STANDARD_TOP_RATED_URI; |
|
68 | + break; |
|
69 | + case 'most viewed': |
|
70 | + $this->_url = Zend_Gdata_YouTube::STANDARD_MOST_VIEWED_URI; |
|
71 | + break; |
|
72 | + case 'recently featured': |
|
73 | + $this->_url = Zend_Gdata_YouTube::STANDARD_RECENTLY_FEATURED_URI; |
|
74 | + break; |
|
75 | + case 'mobile': |
|
76 | + $this->_url = Zend_Gdata_YouTube::STANDARD_WATCH_ON_MOBILE_URI; |
|
77 | + break; |
|
78 | + case 'related': |
|
79 | + if ($videoId === null) { |
|
80 | + require_once 'Zend/Gdata/App/InvalidArgumentException.php'; |
|
81 | + throw new Zend_Gdata_App_InvalidArgumentException( |
|
82 | + 'Video ID must be set for feed of type: ' . $feedType); |
|
83 | + } else { |
|
84 | + $this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' . $videoId . |
|
85 | + '/related'; |
|
108 | 86 | } |
109 | - } |
|
110 | - break; |
|
111 | - default: |
|
112 | - require_once 'Zend/Gdata/App/Exception.php'; |
|
113 | - throw new Zend_Gdata_App_Exception('Unknown feed type'); |
|
114 | - break; |
|
87 | + break; |
|
88 | + case 'responses': |
|
89 | + if ($videoId === null) { |
|
90 | + require_once 'Zend/Gdata/App/InvalidArgumentException.php'; |
|
91 | + throw new Zend_Gdata_App_Exception( |
|
92 | + 'Video ID must be set for feed of type: ' . $feedType); |
|
93 | + } else { |
|
94 | + $this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' . $videoId . |
|
95 | + '/responses'; |
|
96 | + } |
|
97 | + break; |
|
98 | + case 'comments': |
|
99 | + if ($videoId === null) { |
|
100 | + require_once 'Zend/Gdata/App/InvalidArgumentException.php'; |
|
101 | + throw new Zend_Gdata_App_Exception( |
|
102 | + 'Video ID must be set for feed of type: ' . $feedType); |
|
103 | + } else { |
|
104 | + $this->_url = Zend_Gdata_YouTube::VIDEO_URI . '/' . |
|
105 | + $videoId . '/comments'; |
|
106 | + if ($entry !== null) { |
|
107 | + $this->_url .= '/' . $entry; |
|
108 | + } |
|
109 | + } |
|
110 | + break; |
|
111 | + default: |
|
112 | + require_once 'Zend/Gdata/App/Exception.php'; |
|
113 | + throw new Zend_Gdata_App_Exception('Unknown feed type'); |
|
114 | + break; |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function setLocation($value) |
126 | 126 | { |
127 | - switch($value) { |
|
127 | + switch ($value) { |
|
128 | 128 | case null: |
129 | 129 | unset($this->_params['location']); |
130 | 130 | default: |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | 'URL parameter'); |
137 | 137 | } |
138 | 138 | |
139 | - foreach($parameters as $param) { |
|
139 | + foreach ($parameters as $param) { |
|
140 | 140 | $temp = trim($param); |
141 | 141 | // strip off the optional exclamation mark for numeric check |
142 | 142 | if (substr($temp, -1) == '!') { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function setLocationRadius($value) |
178 | 178 | { |
179 | - switch($value) { |
|
179 | + switch ($value) { |
|
180 | 180 | case null: |
181 | 181 | unset($this->_params['location-radius']); |
182 | 182 | default: |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | default: |
351 | 351 | require_once 'Zend/Gdata/App/InvalidArgumentException.php'; |
352 | 352 | throw new Zend_Gdata_App_InvalidArgumentException( |
353 | - 'The safeSearch parameter only supports the values '. |
|
353 | + 'The safeSearch parameter only supports the values ' . |
|
354 | 354 | '\'none\', \'moderate\' or \'strict\'.'); |
355 | 355 | } |
356 | 356 | } |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | continue; |
462 | 462 | } |
463 | 463 | |
464 | - switch($name) { |
|
464 | + switch ($name) { |
|
465 | 465 | case 'location-radius': |
466 | 466 | if ($majorProtocolVersion == 1) { |
467 | 467 | require_once 'Zend/Gdata/App/VersionException.php'; |
@@ -94,14 +94,14 @@ |
||
94 | 94 | { |
95 | 95 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; |
96 | 96 | switch ($absoluteNodeName) { |
97 | - case $this->lookupNamespace('yt') . ':' . 'position': |
|
98 | - $position = new Zend_Gdata_YouTube_Extension_Position(); |
|
99 | - $position->transferFromDOM($child); |
|
100 | - $this->_position = $position; |
|
101 | - break; |
|
102 | - default: |
|
103 | - parent::takeChildFromDOM($child); |
|
104 | - break; |
|
97 | + case $this->lookupNamespace('yt') . ':' . 'position': |
|
98 | + $position = new Zend_Gdata_YouTube_Extension_Position(); |
|
99 | + $position->transferFromDOM($child); |
|
100 | + $this->_position = $position; |
|
101 | + break; |
|
102 | + default: |
|
103 | + parent::takeChildFromDOM($child); |
|
104 | + break; |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 |
@@ -100,14 +100,14 @@ |
||
100 | 100 | { |
101 | 101 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; |
102 | 102 | switch ($absoluteNodeName) { |
103 | - case $this->lookupNamespace('yt') . ':' . 'status': |
|
104 | - $status = new Zend_Gdata_YouTube_Extension_Status(); |
|
105 | - $status->transferFromDOM($child); |
|
106 | - $this->_status = $status; |
|
107 | - break; |
|
108 | - default: |
|
109 | - parent::takeChildFromDOM($child); |
|
110 | - break; |
|
103 | + case $this->lookupNamespace('yt') . ':' . 'status': |
|
104 | + $status = new Zend_Gdata_YouTube_Extension_Status(); |
|
105 | + $status->transferFromDOM($child); |
|
106 | + $this->_status = $status; |
|
107 | + break; |
|
108 | + default: |
|
109 | + parent::takeChildFromDOM($child); |
|
110 | + break; |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | } |
233 | 233 | } |
234 | 234 | if ($this->_where != null) { |
235 | - $element->appendChild($this->_where->getDOM( |
|
235 | + $element->appendChild($this->_where->getDOM( |
|
236 | 236 | $element->ownerDocument)); |
237 | 237 | } |
238 | 238 | return $element; |
@@ -599,9 +599,9 @@ discard block |
||
599 | 599 | { |
600 | 600 | $recorded = $this->getRecorded(); |
601 | 601 | if ($recorded != null) { |
602 | - return $recorded->getText(); |
|
602 | + return $recorded->getText(); |
|
603 | 603 | } else { |
604 | - return null; |
|
604 | + return null; |
|
605 | 605 | } |
606 | 606 | } |
607 | 607 | |
@@ -1067,8 +1067,8 @@ discard block |
||
1067 | 1067 | 'Rating for video entry must be between 1 and 5 inclusive.'); |
1068 | 1068 | } |
1069 | 1069 | |
1070 | - require_once 'Zend/Gdata/Extension/Rating.php'; |
|
1071 | - $rating = new Zend_Gdata_Extension_Rating(null, 1, 5, null, |
|
1070 | + require_once 'Zend/Gdata/Extension/Rating.php'; |
|
1071 | + $rating = new Zend_Gdata_Extension_Rating(null, 1, 5, null, |
|
1072 | 1072 | $ratingValue); |
1073 | 1073 | $this->setRating($rating); |
1074 | 1074 | return $this; |
@@ -249,64 +249,64 @@ |
||
249 | 249 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; |
250 | 250 | |
251 | 251 | switch ($absoluteNodeName) { |
252 | - case $this->lookupNamespace('yt') . ':' . 'statistics': |
|
253 | - $statistics = new Zend_Gdata_YouTube_Extension_Statistics(); |
|
254 | - $statistics->transferFromDOM($child); |
|
255 | - $this->_statistics = $statistics; |
|
256 | - break; |
|
257 | - case $this->lookupNamespace('yt') . ':' . 'racy': |
|
258 | - $racy = new Zend_Gdata_YouTube_Extension_Racy(); |
|
259 | - $racy->transferFromDOM($child); |
|
260 | - $this->_racy = $racy; |
|
261 | - break; |
|
262 | - case $this->lookupNamespace('yt') . ':' . 'recorded': |
|
263 | - $recorded = new Zend_Gdata_YouTube_Extension_Recorded(); |
|
264 | - $recorded->transferFromDOM($child); |
|
265 | - $this->_recorded = $recorded; |
|
266 | - break; |
|
267 | - case $this->lookupNamespace('yt') . ':' . 'location': |
|
268 | - $location = new Zend_Gdata_YouTube_Extension_Location(); |
|
269 | - $location->transferFromDOM($child); |
|
270 | - $this->_location = $location; |
|
271 | - break; |
|
272 | - case $this->lookupNamespace('gd') . ':' . 'rating': |
|
273 | - $rating = new Zend_Gdata_Extension_Rating(); |
|
274 | - $rating->transferFromDOM($child); |
|
275 | - $this->_rating = $rating; |
|
276 | - break; |
|
277 | - case $this->lookupNamespace('gd') . ':' . 'comments': |
|
278 | - $comments = new Zend_Gdata_Extension_Comments(); |
|
279 | - $comments->transferFromDOM($child); |
|
280 | - $this->_comments = $comments; |
|
281 | - break; |
|
282 | - case $this->lookupNamespace('yt') . ':' . 'noembed': |
|
283 | - $noEmbed = new Zend_Gdata_YouTube_Extension_NoEmbed(); |
|
284 | - $noEmbed->transferFromDOM($child); |
|
285 | - $this->_noEmbed = $noEmbed; |
|
286 | - break; |
|
287 | - case $this->lookupNamespace('gd') . ':' . 'feedLink': |
|
288 | - $feedLink = new Zend_Gdata_Extension_FeedLink(); |
|
289 | - $feedLink->transferFromDOM($child); |
|
290 | - $this->_feedLink[] = $feedLink; |
|
291 | - break; |
|
292 | - case $this->lookupNamespace('georss') . ':' . 'where': |
|
293 | - $where = new Zend_Gdata_Geo_Extension_GeoRssWhere(); |
|
294 | - $where->transferFromDOM($child); |
|
295 | - $this->_where = $where; |
|
296 | - break; |
|
297 | - case $this->lookupNamespace('atom') . ':' . 'link'; |
|
298 | - $link = new Zend_Gdata_YouTube_Extension_Link(); |
|
299 | - $link->transferFromDOM($child); |
|
300 | - $this->_link[] = $link; |
|
301 | - break; |
|
302 | - case $this->lookupNamespace('app') . ':' . 'control': |
|
303 | - $control = new Zend_Gdata_YouTube_Extension_Control(); |
|
304 | - $control->transferFromDOM($child); |
|
305 | - $this->_control = $control; |
|
306 | - break; |
|
307 | - default: |
|
308 | - parent::takeChildFromDOM($child); |
|
309 | - break; |
|
252 | + case $this->lookupNamespace('yt') . ':' . 'statistics': |
|
253 | + $statistics = new Zend_Gdata_YouTube_Extension_Statistics(); |
|
254 | + $statistics->transferFromDOM($child); |
|
255 | + $this->_statistics = $statistics; |
|
256 | + break; |
|
257 | + case $this->lookupNamespace('yt') . ':' . 'racy': |
|
258 | + $racy = new Zend_Gdata_YouTube_Extension_Racy(); |
|
259 | + $racy->transferFromDOM($child); |
|
260 | + $this->_racy = $racy; |
|
261 | + break; |
|
262 | + case $this->lookupNamespace('yt') . ':' . 'recorded': |
|
263 | + $recorded = new Zend_Gdata_YouTube_Extension_Recorded(); |
|
264 | + $recorded->transferFromDOM($child); |
|
265 | + $this->_recorded = $recorded; |
|
266 | + break; |
|
267 | + case $this->lookupNamespace('yt') . ':' . 'location': |
|
268 | + $location = new Zend_Gdata_YouTube_Extension_Location(); |
|
269 | + $location->transferFromDOM($child); |
|
270 | + $this->_location = $location; |
|
271 | + break; |
|
272 | + case $this->lookupNamespace('gd') . ':' . 'rating': |
|
273 | + $rating = new Zend_Gdata_Extension_Rating(); |
|
274 | + $rating->transferFromDOM($child); |
|
275 | + $this->_rating = $rating; |
|
276 | + break; |
|
277 | + case $this->lookupNamespace('gd') . ':' . 'comments': |
|
278 | + $comments = new Zend_Gdata_Extension_Comments(); |
|
279 | + $comments->transferFromDOM($child); |
|
280 | + $this->_comments = $comments; |
|
281 | + break; |
|
282 | + case $this->lookupNamespace('yt') . ':' . 'noembed': |
|
283 | + $noEmbed = new Zend_Gdata_YouTube_Extension_NoEmbed(); |
|
284 | + $noEmbed->transferFromDOM($child); |
|
285 | + $this->_noEmbed = $noEmbed; |
|
286 | + break; |
|
287 | + case $this->lookupNamespace('gd') . ':' . 'feedLink': |
|
288 | + $feedLink = new Zend_Gdata_Extension_FeedLink(); |
|
289 | + $feedLink->transferFromDOM($child); |
|
290 | + $this->_feedLink[] = $feedLink; |
|
291 | + break; |
|
292 | + case $this->lookupNamespace('georss') . ':' . 'where': |
|
293 | + $where = new Zend_Gdata_Geo_Extension_GeoRssWhere(); |
|
294 | + $where->transferFromDOM($child); |
|
295 | + $this->_where = $where; |
|
296 | + break; |
|
297 | + case $this->lookupNamespace('atom') . ':' . 'link'; |
|
298 | + $link = new Zend_Gdata_YouTube_Extension_Link(); |
|
299 | + $link->transferFromDOM($child); |
|
300 | + $this->_link[] = $link; |
|
301 | + break; |
|
302 | + case $this->lookupNamespace('app') . ':' . 'control': |
|
303 | + $control = new Zend_Gdata_YouTube_Extension_Control(); |
|
304 | + $control->transferFromDOM($child); |
|
305 | + $this->_control = $control; |
|
306 | + break; |
|
307 | + default: |
|
308 | + parent::takeChildFromDOM($child); |
|
309 | + break; |
|
310 | 310 | } |
311 | 311 | } |
312 | 312 |
@@ -936,7 +936,7 @@ discard block |
||
936 | 936 | $this->ensureMediaGroupIsNotNull(); |
937 | 937 | $categories = $this->getMediaGroup()->getCategory(); |
938 | 938 | if ($categories != null) { |
939 | - foreach($categories as $category) { |
|
939 | + foreach ($categories as $category) { |
|
940 | 940 | if ($category->getScheme() == self::YOUTUBE_CATEGORY_SCHEMA) { |
941 | 941 | return $category->getText(); |
942 | 942 | } |
@@ -1014,7 +1014,7 @@ discard block |
||
1014 | 1014 | */ |
1015 | 1015 | public function setVideoDeveloperTags($developerTags) |
1016 | 1016 | { |
1017 | - foreach($developerTags as $developerTag) { |
|
1017 | + foreach ($developerTags as $developerTag) { |
|
1018 | 1018 | $this->addVideoDeveloperTag($developerTag); |
1019 | 1019 | } |
1020 | 1020 | return $this; |
@@ -381,109 +381,109 @@ |
||
381 | 381 | { |
382 | 382 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; |
383 | 383 | switch ($absoluteNodeName) { |
384 | - case $this->lookupNamespace('yt') . ':' . 'description': |
|
385 | - $description = new Zend_Gdata_YouTube_Extension_Description(); |
|
386 | - $description->transferFromDOM($child); |
|
387 | - $this->_description = $description; |
|
388 | - break; |
|
389 | - case $this->lookupNamespace('yt') . ':' . 'aboutMe': |
|
390 | - $aboutMe = new Zend_Gdata_YouTube_Extension_AboutMe(); |
|
391 | - $aboutMe->transferFromDOM($child); |
|
392 | - $this->_aboutMe = $aboutMe; |
|
393 | - break; |
|
394 | - case $this->lookupNamespace('yt') . ':' . 'age': |
|
395 | - $age = new Zend_Gdata_YouTube_Extension_Age(); |
|
396 | - $age->transferFromDOM($child); |
|
397 | - $this->_age = $age; |
|
398 | - break; |
|
399 | - case $this->lookupNamespace('yt') . ':' . 'username': |
|
400 | - $username = new Zend_Gdata_YouTube_Extension_Username(); |
|
401 | - $username->transferFromDOM($child); |
|
402 | - $this->_username = $username; |
|
403 | - break; |
|
404 | - case $this->lookupNamespace('yt') . ':' . 'books': |
|
405 | - $books = new Zend_Gdata_YouTube_Extension_Books(); |
|
406 | - $books->transferFromDOM($child); |
|
407 | - $this->_books = $books; |
|
408 | - break; |
|
409 | - case $this->lookupNamespace('yt') . ':' . 'company': |
|
410 | - $company = new Zend_Gdata_YouTube_Extension_Company(); |
|
411 | - $company->transferFromDOM($child); |
|
412 | - $this->_company = $company; |
|
413 | - break; |
|
414 | - case $this->lookupNamespace('yt') . ':' . 'hobbies': |
|
415 | - $hobbies = new Zend_Gdata_YouTube_Extension_Hobbies(); |
|
416 | - $hobbies->transferFromDOM($child); |
|
417 | - $this->_hobbies = $hobbies; |
|
418 | - break; |
|
419 | - case $this->lookupNamespace('yt') . ':' . 'hometown': |
|
420 | - $hometown = new Zend_Gdata_YouTube_Extension_Hometown(); |
|
421 | - $hometown->transferFromDOM($child); |
|
422 | - $this->_hometown = $hometown; |
|
423 | - break; |
|
424 | - case $this->lookupNamespace('yt') . ':' . 'location': |
|
425 | - $location = new Zend_Gdata_YouTube_Extension_Location(); |
|
426 | - $location->transferFromDOM($child); |
|
427 | - $this->_location = $location; |
|
428 | - break; |
|
429 | - case $this->lookupNamespace('yt') . ':' . 'movies': |
|
430 | - $movies = new Zend_Gdata_YouTube_Extension_Movies(); |
|
431 | - $movies->transferFromDOM($child); |
|
432 | - $this->_movies = $movies; |
|
433 | - break; |
|
434 | - case $this->lookupNamespace('yt') . ':' . 'music': |
|
435 | - $music = new Zend_Gdata_YouTube_Extension_Music(); |
|
436 | - $music->transferFromDOM($child); |
|
437 | - $this->_music = $music; |
|
438 | - break; |
|
439 | - case $this->lookupNamespace('yt') . ':' . 'occupation': |
|
440 | - $occupation = new Zend_Gdata_YouTube_Extension_Occupation(); |
|
441 | - $occupation->transferFromDOM($child); |
|
442 | - $this->_occupation = $occupation; |
|
443 | - break; |
|
444 | - case $this->lookupNamespace('yt') . ':' . 'school': |
|
445 | - $school = new Zend_Gdata_YouTube_Extension_School(); |
|
446 | - $school->transferFromDOM($child); |
|
447 | - $this->_school = $school; |
|
448 | - break; |
|
449 | - case $this->lookupNamespace('yt') . ':' . 'gender': |
|
450 | - $gender = new Zend_Gdata_YouTube_Extension_Gender(); |
|
451 | - $gender->transferFromDOM($child); |
|
452 | - $this->_gender = $gender; |
|
453 | - break; |
|
454 | - case $this->lookupNamespace('yt') . ':' . 'relationship': |
|
455 | - $relationship = new Zend_Gdata_YouTube_Extension_Relationship(); |
|
456 | - $relationship->transferFromDOM($child); |
|
457 | - $this->_relationship = $relationship; |
|
458 | - break; |
|
459 | - case $this->lookupNamespace('yt') . ':' . 'firstName': |
|
460 | - $firstName = new Zend_Gdata_YouTube_Extension_FirstName(); |
|
461 | - $firstName->transferFromDOM($child); |
|
462 | - $this->_firstName = $firstName; |
|
463 | - break; |
|
464 | - case $this->lookupNamespace('yt') . ':' . 'lastName': |
|
465 | - $lastName = new Zend_Gdata_YouTube_Extension_LastName(); |
|
466 | - $lastName->transferFromDOM($child); |
|
467 | - $this->_lastName = $lastName; |
|
468 | - break; |
|
469 | - case $this->lookupNamespace('yt') . ':' . 'statistics': |
|
470 | - $statistics = new Zend_Gdata_YouTube_Extension_Statistics(); |
|
471 | - $statistics->transferFromDOM($child); |
|
472 | - $this->_statistics = $statistics; |
|
473 | - break; |
|
474 | - case $this->lookupNamespace('media') . ':' . 'thumbnail': |
|
475 | - $thumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail(); |
|
476 | - $thumbnail->transferFromDOM($child); |
|
477 | - $this->_thumbnail = $thumbnail; |
|
478 | - break; |
|
479 | - case $this->lookupNamespace('gd') . ':' . 'feedLink': |
|
480 | - $feedLink = new Zend_Gdata_Extension_FeedLink(); |
|
481 | - $feedLink->transferFromDOM($child); |
|
482 | - $this->_feedLink[] = $feedLink; |
|
483 | - break; |
|
484 | - default: |
|
485 | - parent::takeChildFromDOM($child); |
|
486 | - break; |
|
384 | + case $this->lookupNamespace('yt') . ':' . 'description': |
|
385 | + $description = new Zend_Gdata_YouTube_Extension_Description(); |
|
386 | + $description->transferFromDOM($child); |
|
387 | + $this->_description = $description; |
|
388 | + break; |
|
389 | + case $this->lookupNamespace('yt') . ':' . 'aboutMe': |
|
390 | + $aboutMe = new Zend_Gdata_YouTube_Extension_AboutMe(); |
|
391 | + $aboutMe->transferFromDOM($child); |
|
392 | + $this->_aboutMe = $aboutMe; |
|
393 | + break; |
|
394 | + case $this->lookupNamespace('yt') . ':' . 'age': |
|
395 | + $age = new Zend_Gdata_YouTube_Extension_Age(); |
|
396 | + $age->transferFromDOM($child); |
|
397 | + $this->_age = $age; |
|
398 | + break; |
|
399 | + case $this->lookupNamespace('yt') . ':' . 'username': |
|
400 | + $username = new Zend_Gdata_YouTube_Extension_Username(); |
|
401 | + $username->transferFromDOM($child); |
|
402 | + $this->_username = $username; |
|
403 | + break; |
|
404 | + case $this->lookupNamespace('yt') . ':' . 'books': |
|
405 | + $books = new Zend_Gdata_YouTube_Extension_Books(); |
|
406 | + $books->transferFromDOM($child); |
|
407 | + $this->_books = $books; |
|
408 | + break; |
|
409 | + case $this->lookupNamespace('yt') . ':' . 'company': |
|
410 | + $company = new Zend_Gdata_YouTube_Extension_Company(); |
|
411 | + $company->transferFromDOM($child); |
|
412 | + $this->_company = $company; |
|
413 | + break; |
|
414 | + case $this->lookupNamespace('yt') . ':' . 'hobbies': |
|
415 | + $hobbies = new Zend_Gdata_YouTube_Extension_Hobbies(); |
|
416 | + $hobbies->transferFromDOM($child); |
|
417 | + $this->_hobbies = $hobbies; |
|
418 | + break; |
|
419 | + case $this->lookupNamespace('yt') . ':' . 'hometown': |
|
420 | + $hometown = new Zend_Gdata_YouTube_Extension_Hometown(); |
|
421 | + $hometown->transferFromDOM($child); |
|
422 | + $this->_hometown = $hometown; |
|
423 | + break; |
|
424 | + case $this->lookupNamespace('yt') . ':' . 'location': |
|
425 | + $location = new Zend_Gdata_YouTube_Extension_Location(); |
|
426 | + $location->transferFromDOM($child); |
|
427 | + $this->_location = $location; |
|
428 | + break; |
|
429 | + case $this->lookupNamespace('yt') . ':' . 'movies': |
|
430 | + $movies = new Zend_Gdata_YouTube_Extension_Movies(); |
|
431 | + $movies->transferFromDOM($child); |
|
432 | + $this->_movies = $movies; |
|
433 | + break; |
|
434 | + case $this->lookupNamespace('yt') . ':' . 'music': |
|
435 | + $music = new Zend_Gdata_YouTube_Extension_Music(); |
|
436 | + $music->transferFromDOM($child); |
|
437 | + $this->_music = $music; |
|
438 | + break; |
|
439 | + case $this->lookupNamespace('yt') . ':' . 'occupation': |
|
440 | + $occupation = new Zend_Gdata_YouTube_Extension_Occupation(); |
|
441 | + $occupation->transferFromDOM($child); |
|
442 | + $this->_occupation = $occupation; |
|
443 | + break; |
|
444 | + case $this->lookupNamespace('yt') . ':' . 'school': |
|
445 | + $school = new Zend_Gdata_YouTube_Extension_School(); |
|
446 | + $school->transferFromDOM($child); |
|
447 | + $this->_school = $school; |
|
448 | + break; |
|
449 | + case $this->lookupNamespace('yt') . ':' . 'gender': |
|
450 | + $gender = new Zend_Gdata_YouTube_Extension_Gender(); |
|
451 | + $gender->transferFromDOM($child); |
|
452 | + $this->_gender = $gender; |
|
453 | + break; |
|
454 | + case $this->lookupNamespace('yt') . ':' . 'relationship': |
|
455 | + $relationship = new Zend_Gdata_YouTube_Extension_Relationship(); |
|
456 | + $relationship->transferFromDOM($child); |
|
457 | + $this->_relationship = $relationship; |
|
458 | + break; |
|
459 | + case $this->lookupNamespace('yt') . ':' . 'firstName': |
|
460 | + $firstName = new Zend_Gdata_YouTube_Extension_FirstName(); |
|
461 | + $firstName->transferFromDOM($child); |
|
462 | + $this->_firstName = $firstName; |
|
463 | + break; |
|
464 | + case $this->lookupNamespace('yt') . ':' . 'lastName': |
|
465 | + $lastName = new Zend_Gdata_YouTube_Extension_LastName(); |
|
466 | + $lastName->transferFromDOM($child); |
|
467 | + $this->_lastName = $lastName; |
|
468 | + break; |
|
469 | + case $this->lookupNamespace('yt') . ':' . 'statistics': |
|
470 | + $statistics = new Zend_Gdata_YouTube_Extension_Statistics(); |
|
471 | + $statistics->transferFromDOM($child); |
|
472 | + $this->_statistics = $statistics; |
|
473 | + break; |
|
474 | + case $this->lookupNamespace('media') . ':' . 'thumbnail': |
|
475 | + $thumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail(); |
|
476 | + $thumbnail->transferFromDOM($child); |
|
477 | + $this->_thumbnail = $thumbnail; |
|
478 | + break; |
|
479 | + case $this->lookupNamespace('gd') . ':' . 'feedLink': |
|
480 | + $feedLink = new Zend_Gdata_Extension_FeedLink(); |
|
481 | + $feedLink->transferFromDOM($child); |
|
482 | + $this->_feedLink[] = $feedLink; |
|
483 | + break; |
|
484 | + default: |
|
485 | + parent::takeChildFromDOM($child); |
|
486 | + break; |
|
487 | 487 | } |
488 | 488 | } |
489 | 489 |
@@ -197,44 +197,44 @@ |
||
197 | 197 | { |
198 | 198 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; |
199 | 199 | switch ($absoluteNodeName) { |
200 | - case $this->lookupNamespace('gd') . ':' . 'feedLink': |
|
201 | - $feedLink = new Zend_Gdata_Extension_FeedLink(); |
|
202 | - $feedLink->transferFromDOM($child); |
|
203 | - $this->_feedLink[] = $feedLink; |
|
204 | - break; |
|
205 | - case $this->lookupNamespace('media') . ':' . 'thumbnail': |
|
206 | - $mediaThumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail(); |
|
207 | - $mediaThumbnail->transferFromDOM($child); |
|
208 | - $this->_mediaThumbnail = $mediaThumbnail; |
|
209 | - break; |
|
210 | - case $this->lookupNamespace('yt') . ':' . 'countHint': |
|
211 | - $countHint = new Zend_Gdata_YouTube_Extension_CountHint(); |
|
212 | - $countHint->transferFromDOM($child); |
|
213 | - $this->_countHint = $countHint; |
|
214 | - break; |
|
215 | - case $this->lookupNamespace('yt') . ':' . 'playlistTitle': |
|
216 | - $playlistTitle = new Zend_Gdata_YouTube_Extension_PlaylistTitle(); |
|
217 | - $playlistTitle->transferFromDOM($child); |
|
218 | - $this->_playlistTitle = $playlistTitle; |
|
219 | - break; |
|
220 | - case $this->lookupNamespace('yt') . ':' . 'playlistId': |
|
221 | - $playlistId = new Zend_Gdata_YouTube_Extension_PlaylistId(); |
|
222 | - $playlistId->transferFromDOM($child); |
|
223 | - $this->_playlistId = $playlistId; |
|
224 | - break; |
|
225 | - case $this->lookupNamespace('yt') . ':' . 'queryString': |
|
226 | - $queryString = new Zend_Gdata_YouTube_Extension_QueryString(); |
|
227 | - $queryString->transferFromDOM($child); |
|
228 | - $this->_queryString = $queryString; |
|
229 | - break; |
|
230 | - case $this->lookupNamespace('yt') . ':' . 'username': |
|
231 | - $username = new Zend_Gdata_YouTube_Extension_Username(); |
|
232 | - $username->transferFromDOM($child); |
|
233 | - $this->_username = $username; |
|
234 | - break; |
|
235 | - default: |
|
236 | - parent::takeChildFromDOM($child); |
|
237 | - break; |
|
200 | + case $this->lookupNamespace('gd') . ':' . 'feedLink': |
|
201 | + $feedLink = new Zend_Gdata_Extension_FeedLink(); |
|
202 | + $feedLink->transferFromDOM($child); |
|
203 | + $this->_feedLink[] = $feedLink; |
|
204 | + break; |
|
205 | + case $this->lookupNamespace('media') . ':' . 'thumbnail': |
|
206 | + $mediaThumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail(); |
|
207 | + $mediaThumbnail->transferFromDOM($child); |
|
208 | + $this->_mediaThumbnail = $mediaThumbnail; |
|
209 | + break; |
|
210 | + case $this->lookupNamespace('yt') . ':' . 'countHint': |
|
211 | + $countHint = new Zend_Gdata_YouTube_Extension_CountHint(); |
|
212 | + $countHint->transferFromDOM($child); |
|
213 | + $this->_countHint = $countHint; |
|
214 | + break; |
|
215 | + case $this->lookupNamespace('yt') . ':' . 'playlistTitle': |
|
216 | + $playlistTitle = new Zend_Gdata_YouTube_Extension_PlaylistTitle(); |
|
217 | + $playlistTitle->transferFromDOM($child); |
|
218 | + $this->_playlistTitle = $playlistTitle; |
|
219 | + break; |
|
220 | + case $this->lookupNamespace('yt') . ':' . 'playlistId': |
|
221 | + $playlistId = new Zend_Gdata_YouTube_Extension_PlaylistId(); |
|
222 | + $playlistId->transferFromDOM($child); |
|
223 | + $this->_playlistId = $playlistId; |
|
224 | + break; |
|
225 | + case $this->lookupNamespace('yt') . ':' . 'queryString': |
|
226 | + $queryString = new Zend_Gdata_YouTube_Extension_QueryString(); |
|
227 | + $queryString->transferFromDOM($child); |
|
228 | + $this->_queryString = $queryString; |
|
229 | + break; |
|
230 | + case $this->lookupNamespace('yt') . ':' . 'username': |
|
231 | + $username = new Zend_Gdata_YouTube_Extension_Username(); |
|
232 | + $username->transferFromDOM($child); |
|
233 | + $this->_username = $username; |
|
234 | + break; |
|
235 | + default: |
|
236 | + parent::takeChildFromDOM($child); |
|
237 | + break; |
|
238 | 238 | } |
239 | 239 | } |
240 | 240 |
@@ -106,20 +106,20 @@ |
||
106 | 106 | protected function takeAttributeFromDOM($attribute) |
107 | 107 | { |
108 | 108 | switch ($attribute->localName) { |
109 | - case 'row': |
|
110 | - $this->_row = $attribute->nodeValue; |
|
111 | - break; |
|
112 | - case 'col': |
|
113 | - $this->_col = $attribute->nodeValue; |
|
114 | - break; |
|
115 | - case 'inputValue': |
|
116 | - $this->_inputValue = $attribute->nodeValue; |
|
117 | - break; |
|
118 | - case 'numericValue': |
|
119 | - $this->_numericValue = $attribute->nodeValue; |
|
120 | - break; |
|
121 | - default: |
|
122 | - parent::takeAttributeFromDOM($attribute); |
|
109 | + case 'row': |
|
110 | + $this->_row = $attribute->nodeValue; |
|
111 | + break; |
|
112 | + case 'col': |
|
113 | + $this->_col = $attribute->nodeValue; |
|
114 | + break; |
|
115 | + case 'inputValue': |
|
116 | + $this->_inputValue = $attribute->nodeValue; |
|
117 | + break; |
|
118 | + case 'numericValue': |
|
119 | + $this->_numericValue = $attribute->nodeValue; |
|
120 | + break; |
|
121 | + default: |
|
122 | + parent::takeAttributeFromDOM($attribute); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 |
@@ -98,8 +98,12 @@ |
||
98 | 98 | $element = parent::getDOM($doc, $majorVersion, $minorVersion); |
99 | 99 | $element->setAttribute('row', $this->_row); |
100 | 100 | $element->setAttribute('col', $this->_col); |
101 | - if ($this->_inputValue) $element->setAttribute('inputValue', $this->_inputValue); |
|
102 | - if ($this->_numericValue) $element->setAttribute('numericValue', $this->_numericValue); |
|
101 | + if ($this->_inputValue) { |
|
102 | + $element->setAttribute('inputValue', $this->_inputValue); |
|
103 | + } |
|
104 | + if ($this->_numericValue) { |
|
105 | + $element->setAttribute('numericValue', $this->_numericValue); |
|
106 | + } |
|
103 | 107 | return $element; |
104 | 108 | } |
105 | 109 |
@@ -83,14 +83,14 @@ |
||
83 | 83 | protected function takeChildFromDOM($child) |
84 | 84 | { |
85 | 85 | switch ($child->namespaceURI) { |
86 | - case $this->lookupNamespace('gsx'); |
|
87 | - $custom = new Zend_Gdata_Spreadsheets_Extension_Custom($child->localName); |
|
88 | - $custom->transferFromDOM($child); |
|
89 | - $this->addCustom($custom); |
|
90 | - break; |
|
91 | - default: |
|
92 | - parent::takeChildFromDOM($child); |
|
93 | - break; |
|
86 | + case $this->lookupNamespace('gsx'); |
|
87 | + $custom = new Zend_Gdata_Spreadsheets_Extension_Custom($child->localName); |
|
88 | + $custom->transferFromDOM($child); |
|
89 | + $this->addCustom($custom); |
|
90 | + break; |
|
91 | + default: |
|
92 | + parent::takeChildFromDOM($child); |
|
93 | + break; |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | public function setReturnEmpty($value) |
333 | 333 | { |
334 | 334 | if (is_bool($value)) { |
335 | - $this->_params['return-empty'] = ($value?'true':'false'); |
|
335 | + $this->_params['return-empty'] = ($value ? 'true' : 'false'); |
|
336 | 336 | } else if ($value != null) { |
337 | 337 | $this->_params['return-empty'] = $value; |
338 | 338 | } else { |
@@ -366,35 +366,35 @@ discard block |
||
366 | 366 | $uri = $this->_defaultFeedUri; |
367 | 367 | |
368 | 368 | if ($this->_spreadsheetKey != null) { |
369 | - $uri .= '/'.$this->_spreadsheetKey; |
|
369 | + $uri .= '/' . $this->_spreadsheetKey; |
|
370 | 370 | } else { |
371 | 371 | require_once 'Zend/Gdata/App/Exception.php'; |
372 | 372 | throw new Zend_Gdata_App_Exception('A spreadsheet key must be provided for cell queries.'); |
373 | 373 | } |
374 | 374 | |
375 | 375 | if ($this->_worksheetId != null) { |
376 | - $uri .= '/'.$this->_worksheetId; |
|
376 | + $uri .= '/' . $this->_worksheetId; |
|
377 | 377 | } else { |
378 | 378 | require_once 'Zend/Gdata/App/Exception.php'; |
379 | 379 | throw new Zend_Gdata_App_Exception('A worksheet id must be provided for cell queries.'); |
380 | 380 | } |
381 | 381 | |
382 | 382 | if ($this->_visibility != null) { |
383 | - $uri .= '/'.$this->_visibility; |
|
383 | + $uri .= '/' . $this->_visibility; |
|
384 | 384 | } else { |
385 | 385 | require_once 'Zend/Gdata/App/Exception.php'; |
386 | 386 | throw new Zend_Gdata_App_Exception('A visibility must be provided for cell queries.'); |
387 | 387 | } |
388 | 388 | |
389 | 389 | if ($this->_projection != null) { |
390 | - $uri .= '/'.$this->_projection; |
|
390 | + $uri .= '/' . $this->_projection; |
|
391 | 391 | } else { |
392 | 392 | require_once 'Zend/Gdata/App/Exception.php'; |
393 | 393 | throw new Zend_Gdata_App_Exception('A projection must be provided for cell queries.'); |
394 | 394 | } |
395 | 395 | |
396 | 396 | if ($this->_cellId != null) { |
397 | - $uri .= '/'.$this->_cellId; |
|
397 | + $uri .= '/' . $this->_cellId; |
|
398 | 398 | } |
399 | 399 | } else { |
400 | 400 | $uri = $this->_url; |