TYPO3 CMS  TYPO3_8-7
Dependency.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 
21 {
25  protected $identifier = '';
26 
30  protected $lowestVersion = '';
31 
35  protected $highestVersion = '';
36 
40  protected $type = '';
41 
45  protected static $dependencyTypes = [
46  'depends',
47  'conflicts',
48  'suggests'
49  ];
50 
54  public static $specialDependencies = [
55  'typo3',
56  'php'
57  ];
58 
63  {
64  $this->highestVersion = $highestVersion;
65  }
66 
70  public function getHighestVersion()
71  {
72  return $this->highestVersion;
73  }
74 
78  public function setIdentifier($identifier)
79  {
80  $this->identifier = $identifier;
81  }
82 
86  public function getIdentifier()
87  {
88  return $this->identifier;
89  }
90 
95  {
96  $this->lowestVersion = $lowestVersion;
97  }
98 
102  public function getLowestVersion()
103  {
104  return $this->lowestVersion;
105  }
106 
111  public function setType($type)
112  {
113  if (in_array($type, self::$dependencyTypes)) {
114  $this->type = $type;
115  } else {
116  throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException($type . ' was not a valid dependency type.', 1476122402);
117  }
118  }
119 
123  public function getType()
124  {
125  return $this->type;
126  }
127 }