‪TYPO3CMS  9.5
AbstractExtensionXmlParser.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
22 {
28  protected ‪$authorcompany;
29 
35  protected ‪$authoremail;
36 
42  protected ‪$authorname;
43 
49  protected ‪$category;
50 
56  protected ‪$dependencies;
57 
63  protected ‪$description;
64 
71 
77  protected ‪$extensionKey;
78 
84  protected ‪$lastuploaddate;
85 
91  protected ‪$ownerusername;
92 
98  protected ‪$reviewstate;
99 
105  protected ‪$state;
106 
112  protected ‪$t3xfilemd5;
113 
119  protected ‪$title;
120 
126  protected ‪$uploadcomment;
127 
133  protected ‪$version;
134 
140  protected ‪$versionDownloadCounter;
141 
153  public function ‪getAll()
154  {
155  $versionProperties = [];
156  $versionProperties['extkey'] = ‪$this->extensionKey;
157  $versionProperties['version'] = ‪$this->version;
158  $versionProperties['alldownloadcounter'] = ‪$this->extensionDownloadCounter;
159  $versionProperties['downloadcounter'] = ‪$this->versionDownloadCounter;
160  $versionProperties['title'] = ‪$this->title;
161  $versionProperties['description'] = ‪$this->description;
162  $versionProperties['state'] = ‪$this->state;
163  $versionProperties['reviewstate'] = ‪$this->reviewstate;
164  $versionProperties['category'] = ‪$this->category;
165  $versionProperties['lastuploaddate'] = ‪$this->lastuploaddate;
166  $versionProperties['uploadcomment'] = ‪$this->uploadcomment;
167  $versionProperties['dependencies'] = ‪$this->dependencies;
168  $versionProperties['authorname'] = ‪$this->authorname;
169  $versionProperties['authoremail'] = ‪$this->authoremail;
170  $versionProperties['authorcompany'] = ‪$this->authorcompany;
171  $versionProperties['ownerusername'] = ‪$this->ownerusername;
172  $versionProperties['t3xfilemd5'] = ‪$this->t3xfilemd5;
173  return $versionProperties;
174  }
175 
182  public function ‪getAlldownloadcounter()
183  {
185  }
186 
193  public function ‪getAuthorcompany()
194  {
196  }
197 
204  public function ‪getAuthoremail()
205  {
206  return ‪$this->authoremail;
207  }
208 
215  public function ‪getAuthorname()
216  {
217  return ‪$this->authorname;
218  }
219 
226  public function ‪getCategory()
227  {
228  return ‪$this->category;
229  }
230 
237  public function ‪getDependencies()
238  {
239  return ‪$this->dependencies;
240  }
241 
248  public function ‪getDescription()
249  {
250  return ‪$this->description;
251  }
252 
259  public function ‪getDownloadcounter()
260  {
262  }
263 
270  public function ‪getExtkey()
271  {
272  return ‪$this->extensionKey;
273  }
274 
281  public function ‪getLastuploaddate()
282  {
284  }
285 
292  public function ‪getOwnerusername()
293  {
295  }
296 
303  public function ‪getReviewstate()
304  {
305  return ‪$this->reviewstate;
306  }
307 
314  public function ‪getState()
315  {
316  return ‪$this->state;
317  }
318 
325  public function ‪getT3xfilemd5()
326  {
327  return ‪$this->t3xfilemd5;
328  }
329 
336  public function ‪getTitle()
337  {
338  return ‪$this->title;
339  }
340 
347  public function ‪getUploadcomment()
348  {
350  }
351 
358  public function ‪getVersion()
359  {
360  return ‪$this->version;
361  }
362 
369  protected function ‪resetProperties($resetAll = false)
370  {
371  // resetting at least class property "version" is mandatory
372  // as we need to do some magic in regards to
373  // an extension's and version's child node "downloadcounter"
374  $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;
375  if ($resetAll) {
376  $this->extensionKey = $this->extensionDownloadCounter = null;
377  }
378  }
379 
386  protected function ‪convertDependencies(‪$dependencies)
387  {
388  $newDependencies = [];
389  $dependenciesArray = unserialize(‪$dependencies, ['allowed_classes' => false]);
390  if (is_array($dependenciesArray)) {
391  foreach ($dependenciesArray as ‪$version) {
392  if (!empty(‪$version['kind']) && !empty(‪$version['extensionKey'])) {
393  $newDependencies[‪$version['kind']][‪$version['extensionKey']] = ‪$version['versionRange'];
394  }
395  }
396  }
397  return serialize($newDependencies);
398  }
399 }
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$description
‪string $description
Definition: AbstractExtensionXmlParser.php:57
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getAuthorname
‪string getAuthorname()
Definition: AbstractExtensionXmlParser.php:198
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$authoremail
‪string $authoremail
Definition: AbstractExtensionXmlParser.php:33
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$versionDownloadCounter
‪string $versionDownloadCounter
Definition: AbstractExtensionXmlParser.php:123
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getLastuploaddate
‪string getLastuploaddate()
Definition: AbstractExtensionXmlParser.php:264
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$extensionKey
‪string $extensionKey
Definition: AbstractExtensionXmlParser.php:69
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$lastuploaddate
‪string $lastuploaddate
Definition: AbstractExtensionXmlParser.php:75
‪TYPO3\CMS\Extensionmanager\Utility\Parser
Definition: AbstractExtensionXmlParser.php:2
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getState
‪string getState()
Definition: AbstractExtensionXmlParser.php:297
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$t3xfilemd5
‪string $t3xfilemd5
Definition: AbstractExtensionXmlParser.php:99
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\convertDependencies
‪string convertDependencies($dependencies)
Definition: AbstractExtensionXmlParser.php:369
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getDownloadcounter
‪string getDownloadcounter()
Definition: AbstractExtensionXmlParser.php:242
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$uploadcomment
‪string $uploadcomment
Definition: AbstractExtensionXmlParser.php:111
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getAuthorcompany
‪string getAuthorcompany()
Definition: AbstractExtensionXmlParser.php:176
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$authorcompany
‪string $authorcompany
Definition: AbstractExtensionXmlParser.php:27
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$extensionDownloadCounter
‪string $extensionDownloadCounter
Definition: AbstractExtensionXmlParser.php:63
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getOwnerusername
‪string getOwnerusername()
Definition: AbstractExtensionXmlParser.php:275
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$authorname
‪string $authorname
Definition: AbstractExtensionXmlParser.php:39
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractXmlParser
Definition: AbstractXmlParser.php:22
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getAll
‪array getAll()
Definition: AbstractExtensionXmlParser.php:136
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getUploadcomment
‪string getUploadcomment()
Definition: AbstractExtensionXmlParser.php:330
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getCategory
‪string getCategory()
Definition: AbstractExtensionXmlParser.php:209
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser
Definition: AbstractExtensionXmlParser.php:22
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getT3xfilemd5
‪string getT3xfilemd5()
Definition: AbstractExtensionXmlParser.php:308
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$category
‪string $category
Definition: AbstractExtensionXmlParser.php:45
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$dependencies
‪string $dependencies
Definition: AbstractExtensionXmlParser.php:51
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getAuthoremail
‪string getAuthoremail()
Definition: AbstractExtensionXmlParser.php:187
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getReviewstate
‪string getReviewstate()
Definition: AbstractExtensionXmlParser.php:286
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\resetProperties
‪resetProperties($resetAll=false)
Definition: AbstractExtensionXmlParser.php:352
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getDescription
‪string getDescription()
Definition: AbstractExtensionXmlParser.php:231
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getAlldownloadcounter
‪string getAlldownloadcounter()
Definition: AbstractExtensionXmlParser.php:165
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$reviewstate
‪string $reviewstate
Definition: AbstractExtensionXmlParser.php:87
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getDependencies
‪string getDependencies()
Definition: AbstractExtensionXmlParser.php:220
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getVersion
‪string getVersion()
Definition: AbstractExtensionXmlParser.php:341
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getTitle
‪string getTitle()
Definition: AbstractExtensionXmlParser.php:319
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$version
‪string $version
Definition: AbstractExtensionXmlParser.php:117
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$title
‪string $title
Definition: AbstractExtensionXmlParser.php:105
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$ownerusername
‪string $ownerusername
Definition: AbstractExtensionXmlParser.php:81
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\getExtkey
‪string getExtkey()
Definition: AbstractExtensionXmlParser.php:253
‪TYPO3\CMS\Extensionmanager\Utility\Parser\AbstractExtensionXmlParser\$state
‪string $state
Definition: AbstractExtensionXmlParser.php:93