Mercurial > hg > isophonics-drupal-site
comparison vendor/zendframework/zend-feed/src/Reader/Extension/Podcast/Feed.php @ 12:7a779792577d
Update Drupal core to v8.4.5 (via Composer)
author | Chris Cannam |
---|---|
date | Fri, 23 Feb 2018 15:52:07 +0000 |
parents | 4c8ae668cc8c |
children | c2387f117808 |
comparison
equal
deleted
inserted
replaced
11:bfffd8d7479a | 12:7a779792577d |
---|---|
27 return $this->data['author']; | 27 return $this->data['author']; |
28 } | 28 } |
29 | 29 |
30 $author = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:author)'); | 30 $author = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:author)'); |
31 | 31 |
32 if (!$author) { | 32 if (! $author) { |
33 $author = null; | 33 $author = null; |
34 } | 34 } |
35 | 35 |
36 $this->data['author'] = $author; | 36 $this->data['author'] = $author; |
37 | 37 |
49 return $this->data['block']; | 49 return $this->data['block']; |
50 } | 50 } |
51 | 51 |
52 $block = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:block)'); | 52 $block = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:block)'); |
53 | 53 |
54 if (!$block) { | 54 if (! $block) { |
55 $block = null; | 55 $block = null; |
56 } | 56 } |
57 | 57 |
58 $this->data['block'] = $block; | 58 $this->data['block'] = $block; |
59 | 59 |
81 | 81 |
82 if ($node->childNodes->length > 0) { | 82 if ($node->childNodes->length > 0) { |
83 $children = []; | 83 $children = []; |
84 | 84 |
85 foreach ($node->childNodes as $childNode) { | 85 foreach ($node->childNodes as $childNode) { |
86 if (!($childNode instanceof DOMText)) { | 86 if (! ($childNode instanceof DOMText)) { |
87 $children[$childNode->getAttribute('text')] = null; | 87 $children[$childNode->getAttribute('text')] = null; |
88 } | 88 } |
89 } | 89 } |
90 } | 90 } |
91 | 91 |
92 $categories[$node->getAttribute('text')] = $children; | 92 $categories[$node->getAttribute('text')] = $children; |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 if (!$categories) { | 96 if (! $categories) { |
97 $categories = null; | 97 $categories = null; |
98 } | 98 } |
99 | 99 |
100 $this->data['categories'] = $categories; | 100 $this->data['categories'] = $categories; |
101 | 101 |
113 return $this->data['explicit']; | 113 return $this->data['explicit']; |
114 } | 114 } |
115 | 115 |
116 $explicit = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:explicit)'); | 116 $explicit = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:explicit)'); |
117 | 117 |
118 if (!$explicit) { | 118 if (! $explicit) { |
119 $explicit = null; | 119 $explicit = null; |
120 } | 120 } |
121 | 121 |
122 $this->data['explicit'] = $explicit; | 122 $this->data['explicit'] = $explicit; |
123 | 123 |
135 return $this->data['image']; | 135 return $this->data['image']; |
136 } | 136 } |
137 | 137 |
138 $image = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:image/@href)'); | 138 $image = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:image/@href)'); |
139 | 139 |
140 if (!$image) { | 140 if (! $image) { |
141 $image = null; | 141 $image = null; |
142 } | 142 } |
143 | 143 |
144 $this->data['image'] = $image; | 144 $this->data['image'] = $image; |
145 | 145 |
157 return $this->data['keywords']; | 157 return $this->data['keywords']; |
158 } | 158 } |
159 | 159 |
160 $keywords = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:keywords)'); | 160 $keywords = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:keywords)'); |
161 | 161 |
162 if (!$keywords) { | 162 if (! $keywords) { |
163 $keywords = null; | 163 $keywords = null; |
164 } | 164 } |
165 | 165 |
166 $this->data['keywords'] = $keywords; | 166 $this->data['keywords'] = $keywords; |
167 | 167 |
179 return $this->data['new-feed-url']; | 179 return $this->data['new-feed-url']; |
180 } | 180 } |
181 | 181 |
182 $newFeedUrl = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:new-feed-url)'); | 182 $newFeedUrl = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:new-feed-url)'); |
183 | 183 |
184 if (!$newFeedUrl) { | 184 if (! $newFeedUrl) { |
185 $newFeedUrl = null; | 185 $newFeedUrl = null; |
186 } | 186 } |
187 | 187 |
188 $this->data['new-feed-url'] = $newFeedUrl; | 188 $this->data['new-feed-url'] = $newFeedUrl; |
189 | 189 |
204 $owner = null; | 204 $owner = null; |
205 | 205 |
206 $email = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:owner/itunes:email)'); | 206 $email = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:owner/itunes:email)'); |
207 $name = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:owner/itunes:name)'); | 207 $name = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:owner/itunes:name)'); |
208 | 208 |
209 if (!empty($email)) { | 209 if (! empty($email)) { |
210 $owner = $email . (empty($name) ? '' : ' (' . $name . ')'); | 210 $owner = $email . (empty($name) ? '' : ' (' . $name . ')'); |
211 } elseif (!empty($name)) { | 211 } elseif (! empty($name)) { |
212 $owner = $name; | 212 $owner = $name; |
213 } | 213 } |
214 | 214 |
215 if (!$owner) { | 215 if (! $owner) { |
216 $owner = null; | 216 $owner = null; |
217 } | 217 } |
218 | 218 |
219 $this->data['owner'] = $owner; | 219 $this->data['owner'] = $owner; |
220 | 220 |
232 return $this->data['subtitle']; | 232 return $this->data['subtitle']; |
233 } | 233 } |
234 | 234 |
235 $subtitle = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:subtitle)'); | 235 $subtitle = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:subtitle)'); |
236 | 236 |
237 if (!$subtitle) { | 237 if (! $subtitle) { |
238 $subtitle = null; | 238 $subtitle = null; |
239 } | 239 } |
240 | 240 |
241 $this->data['subtitle'] = $subtitle; | 241 $this->data['subtitle'] = $subtitle; |
242 | 242 |
254 return $this->data['summary']; | 254 return $this->data['summary']; |
255 } | 255 } |
256 | 256 |
257 $summary = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:summary)'); | 257 $summary = $this->xpath->evaluate('string(' . $this->getXpathPrefix() . '/itunes:summary)'); |
258 | 258 |
259 if (!$summary) { | 259 if (! $summary) { |
260 $summary = null; | 260 $summary = null; |
261 } | 261 } |
262 | 262 |
263 $this->data['summary'] = $summary; | 263 $this->data['summary'] = $summary; |
264 | 264 |