TYPO3 CMS  TYPO3_7-6
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 
64  {
65  $this->highestVersion = $highestVersion;
66  }
67 
71  public function getHighestVersion()
72  {
73  return $this->highestVersion;
74  }
75 
80  public function setIdentifier($identifier)
81  {
82  $this->identifier = $identifier;
83  }
84 
88  public function getIdentifier()
89  {
90  return $this->identifier;
91  }
92 
98  {
99  $this->lowestVersion = $lowestVersion;
100  }
101 
105  public function getLowestVersion()
106  {
107  return $this->lowestVersion;
108  }
109 
115  public function setType($type)
116  {
117  if (in_array($type, self::$dependencyTypes)) {
118  $this->type = $type;
119  } else {
120  throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException($type . ' was not a valid dependency type.');
121  }
122  }
123 
127  public function getType()
128  {
129  return $this->type;
130  }
131 }