Dependency

Value Object of a single dependency of an extension

Internal

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 = ''

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".

Return values
self

getHighestVersion()

public getHighestVersion() : string
Return values
string

getHighestVersionAsInteger()

public getHighestVersionAsInteger() : int
Return values
int

getIdentifier()

public getIdentifier() : string
Return values
string

getLowestVersion()

public getLowestVersion() : string
Return values
string

getLowestVersionAsInteger()

public getLowestVersionAsInteger() : int
Return values
int

getType()

public getType() : string
Return values
string

isVersionCompatible()

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


        
On this page

Search results