Mercurial > hg > isophonics-drupal-site
comparison vendor/zendframework/zend-feed/src/Reader/Extension/AbstractEntry.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 |
comparison
equal
deleted
inserted
replaced
11:bfffd8d7479a | 12:7a779792577d |
---|---|
133 | 133 |
134 $this->data['type'] = $type; | 134 $this->data['type'] = $type; |
135 if ($type === Reader\Reader::TYPE_RSS_10 | 135 if ($type === Reader\Reader::TYPE_RSS_10 |
136 || $type === Reader\Reader::TYPE_RSS_090 | 136 || $type === Reader\Reader::TYPE_RSS_090 |
137 ) { | 137 ) { |
138 $this->setXpathPrefix('//rss:item[' . ($this->entryKey + 1) . ']'); | 138 $this->setXpathPrefix('//rss:item[' . ((int)$this->entryKey + 1) . ']'); |
139 return $this; | 139 return $this; |
140 } | 140 } |
141 | 141 |
142 if ($type === Reader\Reader::TYPE_ATOM_10 | 142 if ($type === Reader\Reader::TYPE_ATOM_10 |
143 || $type === Reader\Reader::TYPE_ATOM_03 | 143 || $type === Reader\Reader::TYPE_ATOM_03 |
144 ) { | 144 ) { |
145 $this->setXpathPrefix('//atom:entry[' . ($this->entryKey + 1) . ']'); | 145 $this->setXpathPrefix('//atom:entry[' . ((int)$this->entryKey + 1) . ']'); |
146 return $this; | 146 return $this; |
147 } | 147 } |
148 | 148 |
149 $this->setXpathPrefix('//item[' . ($this->entryKey + 1) . ']'); | 149 $this->setXpathPrefix('//item[' . ((int)$this->entryKey + 1) . ']'); |
150 return $this; | 150 return $this; |
151 } | 151 } |
152 | 152 |
153 /** | 153 /** |
154 * Get the entry type | 154 * Get the entry type |
184 * | 184 * |
185 * @return DOMXPath | 185 * @return DOMXPath |
186 */ | 186 */ |
187 public function getXpath() | 187 public function getXpath() |
188 { | 188 { |
189 if (!$this->xpath) { | 189 if (! $this->xpath) { |
190 $this->setXpath(new DOMXPath($this->getDomDocument())); | 190 $this->setXpath(new DOMXPath($this->getDomDocument())); |
191 } | 191 } |
192 return $this->xpath; | 192 return $this->xpath; |
193 } | 193 } |
194 | 194 |