Dependency
Value Object of a single dependency of an extension
This class is a specific domain model implementation and is not part of the Public TYPO3 API.
Table of Contents
Properties
- $specialDependencies : array<string|int, mixed>
- $dependencyTypes : array<string|int, mixed>
- $highestVersion : string
- $identifier : string
- $lowestVersion : string
- $type : string
Methods
- createFromEmConf() : self
- Use this factory when building dependencies of an extension, like ["depends"]["news"] => '1.0.0-2.6.9'
- getHighestVersion() : string
- getHighestVersionAsInteger() : int
- getIdentifier() : string
- getLowestVersion() : string
- getLowestVersionAsInteger() : int
- getType() : string
- isVersionCompatible() : bool
- Compares the given version number against the lowest and highest possible version number of this dependency (e.g. "typo3") to determine if the given version is "compatible".
Properties
$specialDependencies
public
static array<string|int, mixed>
$specialDependencies
= ['typo3', 'php']
$dependencyTypes
protected
static array<string|int, mixed>
$dependencyTypes
= ['depends', 'conflicts', 'suggests']
$highestVersion
protected
string
$highestVersion
= ''
$identifier
protected
string
$identifier
= ''
$lowestVersion
protected
string
$lowestVersion
= ''
$type
protected
string
$type
= ''
Methods
createFromEmConf()
Use this factory when building dependencies of an extension, like ["depends"]["news"] => '1.0.0-2.6.9'
public
static createFromEmConf(string $identifier[, string $versionConstraint = '' ][, string $dependencyType = 'depends' ]) : self
Parameters
- $identifier : string
-
the extension name or "typo3" or "php" for TYPO3 Core / PHP version constraints
- $versionConstraint : string = ''
-
the actual version number. "1.0.0-2.0.0" or "1.0.0" which means "1.0.0 or higher"
- $dependencyType : string = 'depends'
-
use "depends", "suggests" or "conflicts".
Tags
Return values
selfgetHighestVersion()
public
getHighestVersion() : string
Return values
stringgetHighestVersionAsInteger()
public
getHighestVersionAsInteger() : int
Return values
intgetIdentifier()
public
getIdentifier() : string
Return values
stringgetLowestVersion()
public
getLowestVersion() : string
Return values
stringgetLowestVersionAsInteger()
public
getLowestVersionAsInteger() : int
Return values
intgetType()
public
getType() : string
Return values
stringisVersionCompatible()
Compares the given version number against the lowest and highest possible version number of this dependency (e.g. "typo3") to determine if the given version is "compatible".
public
isVersionCompatible(string $version) : bool
Parameters
- $version : string
Return values
bool —TRUE if the version number is compatible