TYPO3 CMS  TYPO3_6-2
AbstractExtensionXmlParser.php
Go to the documentation of this file.
1 <?php
3 
30 
36  protected $authorcompany = NULL;
37 
43  protected $authoremail = NULL;
44 
50  protected $authorname = NULL;
51 
57  protected $category = NULL;
58 
64  protected $dependencies = NULL;
65 
71  protected $description = NULL;
72 
78  protected $extensionDownloadCounter = NULL;
79 
85  protected $extensionKey = NULL;
86 
92  protected $lastuploaddate = NULL;
93 
99  protected $ownerusername = NULL;
100 
106  protected $reviewstate = NULL;
107 
113  protected $state = NULL;
114 
120  protected $t3xfilemd5 = NULL;
121 
127  protected $title = NULL;
128 
134  protected $uploadcomment = NULL;
135 
141  protected $version = NULL;
142 
148  protected $versionDownloadCounter = NULL;
149 
162  public function getAll() {
163  $versionProperties = array();
164  $versionProperties['extkey'] = $this->extensionKey;
165  $versionProperties['version'] = $this->version;
166  $versionProperties['alldownloadcounter'] = $this->extensionDownloadCounter;
167  $versionProperties['downloadcounter'] = $this->versionDownloadCounter;
168  $versionProperties['title'] = $this->title;
169  $versionProperties['description'] = $this->description;
170  $versionProperties['state'] = $this->state;
171  $versionProperties['reviewstate'] = $this->reviewstate;
172  $versionProperties['category'] = $this->category;
173  $versionProperties['lastuploaddate'] = $this->lastuploaddate;
174  $versionProperties['uploadcomment'] = $this->uploadcomment;
175  $versionProperties['dependencies'] = $this->dependencies;
176  $versionProperties['authorname'] = $this->authorname;
177  $versionProperties['authoremail'] = $this->authoremail;
178  $versionProperties['authorcompany'] = $this->authorcompany;
179  $versionProperties['ownerusername'] = $this->ownerusername;
180  $versionProperties['t3xfilemd5'] = $this->t3xfilemd5;
181  return $versionProperties;
182  }
183 
191  public function getAlldownloadcounter() {
193  }
194 
202  public function getAuthorcompany() {
203  return $this->authorcompany;
204  }
205 
213  public function getAuthoremail() {
214  return $this->authoremail;
215  }
216 
224  public function getAuthorname() {
225  return $this->authorname;
226  }
227 
235  public function getCategory() {
236  return $this->category;
237  }
238 
246  public function getDependencies() {
247  return $this->dependencies;
248  }
249 
257  public function getDescription() {
258  return $this->description;
259  }
260 
268  public function getDownloadcounter() {
270  }
271 
279  public function getExtkey() {
280  return $this->extensionKey;
281  }
282 
290  public function getLastuploaddate() {
291  return $this->lastuploaddate;
292  }
293 
301  public function getOwnerusername() {
302  return $this->ownerusername;
303  }
304 
312  public function getReviewstate() {
313  return $this->reviewstate;
314  }
315 
323  public function getState() {
324  return $this->state;
325  }
326 
334  public function getT3xfilemd5() {
335  return $this->t3xfilemd5;
336  }
337 
345  public function getTitle() {
346  return $this->title;
347  }
348 
356  public function getUploadcomment() {
357  return $this->uploadcomment;
358  }
359 
367  public function getVersion() {
368  return $this->version;
369  }
370 
378  protected function resetProperties($resetAll = FALSE) {
379  // resetting at least class property "version" is mandatory
380  // as we need to do some magic in regards to
381  // an extension's and version's child node "downloadcounter"
382  $this->version = ($this->title = ($this->versionDownloadCounter = ($this->description = ($this->state = ($this->reviewstate = ($this->category = ($this->lastuploaddate = ($this->uploadcomment = ($this->dependencies = ($this->authorname = ($this->authoremail = ($this->authorcompany = ($this->ownerusername = ($this->t3xfilemd5 = NULL))))))))))))));
383  if ($resetAll) {
384  $this->extensionKey = ($this->extensionDownloadCounter = NULL);
385  }
386  }
387 
394  protected function convertDependencies($dependencies) {
395  $newDependencies = array();
396  $dependenciesArray = unserialize($dependencies);
397  if (is_array($dependenciesArray)) {
398  foreach ($dependenciesArray as $version) {
399  if (!empty($version['kind']) && !empty($version['extensionKey'])) {
400  $newDependencies[$version['kind']][$version['extensionKey']] = $version['versionRange'];
401  }
402  }
403  }
404  return serialize($newDependencies);
405  }
406 
407 }