‪TYPO3CMS  10.4
Dependency.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
20 
26 {
30  protected ‪$identifier = '';
31 
35  protected ‪$lowestVersion = '';
36 
40  protected ‪$highestVersion = '';
41 
45  protected ‪$type = '';
46 
50  protected static ‪$dependencyTypes = [
51  'depends',
52  'conflicts',
53  'suggests'
54  ];
55 
59  public static ‪$specialDependencies = [
60  'typo3',
61  'php'
62  ];
63 
68  {
69  $this->highestVersion = ‪$highestVersion;
70  }
71 
75  public function ‪getHighestVersion()
76  {
78  }
79 
83  public function ‪setIdentifier(‪$identifier)
84  {
85  $this->identifier = ‪$identifier;
86  }
87 
91  public function ‪getIdentifier()
92  {
94  }
95 
99  public function ‪setLowestVersion(‪$lowestVersion)
100  {
101  $this->lowestVersion = ‪$lowestVersion;
102  }
103 
107  public function ‪getLowestVersion()
108  {
110  }
111 
116  public function ‪setType(‪$type)
117  {
118  if (in_array(‪$type, self::$dependencyTypes)) {
119  $this->type = ‪$type;
120  } else {
121  throw new ExtensionManagerException(‪$type . ' was not a valid dependency type.', 1476122402);
122  }
123  }
124 
128  public function ‪getType()
129  {
130  return ‪$this->type;
131  }
132 }
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency
Definition: Dependency.php:26
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\getLowestVersion
‪string getLowestVersion()
Definition: Dependency.php:101
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\$dependencyTypes
‪static array $dependencyTypes
Definition: Dependency.php:45
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\getType
‪string getType()
Definition: Dependency.php:122
‪TYPO3\CMS\Extbase\DomainObject\AbstractEntity
Definition: AbstractEntity.php:23
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\setIdentifier
‪setIdentifier($identifier)
Definition: Dependency.php:77
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\setType
‪setType($type)
Definition: Dependency.php:110
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\getIdentifier
‪string getIdentifier()
Definition: Dependency.php:85
‪TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException
Definition: ExtensionManagerException.php:24
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\$highestVersion
‪string $highestVersion
Definition: Dependency.php:37
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\$type
‪string $type
Definition: Dependency.php:41
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\$specialDependencies
‪static array $specialDependencies
Definition: Dependency.php:53
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\setLowestVersion
‪setLowestVersion($lowestVersion)
Definition: Dependency.php:93
‪TYPO3\CMS\Extensionmanager\Domain\Model
Definition: Dependency.php:16
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\setHighestVersion
‪setHighestVersion($highestVersion)
Definition: Dependency.php:61
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\$identifier
‪string $identifier
Definition: Dependency.php:29
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\getHighestVersion
‪string getHighestVersion()
Definition: Dependency.php:69
‪TYPO3\CMS\Extensionmanager\Domain\Model\Dependency\$lowestVersion
‪string $lowestVersion
Definition: Dependency.php:33