Item

package

Default

Methods

Item constructor.

__construct(string $name, string $currentVersion, boolean $isInstalled, boolean $canBeInstalled = true) 

Arguments

$name

string

an name that is unique among all items

$currentVersion

string

$isInstalled

boolean

$canBeInstalled

boolean

indicate if the module can be installed automatically by the resolver

addAlternativeDependencies

addAlternativeDependencies(array $choice) 

Arguments

$choice

array

list of dependencies where one of them should be installed, not all ex:

                     [
                     // this dependency
                     '$name'=> '$version',
                     // or this dependency
                     '$name'=> '$version',
                     // or ...
                     ]

addDependency

addDependency( $name,  $version = '*',  $optional = false) 

Arguments

$name

$version

$optional

addIncompatibility

addIncompatibility( $name,  $version = '*') 

Arguments

$name

$version

canBeInstalled

canBeInstalled() 

getAction

getAction() 

getAlternativeDependencies

getAlternativeDependencies() 

getCurrentVersion

getCurrentVersion() 

getDependencies

getDependencies() 

getIncompatibilities

getIncompatibilities() 

getName

getName() 

getNextVersion

getNextVersion() 

getProperty

getProperty( $name) 

Arguments

$name

isInstalled

isInstalled() 

setAction

setAction(integer $action, null $nextVersion = null) 

Arguments

$action

integer

one of Resolver::ACTION_* const

$nextVersion

null

if action is ACTION_UPGRADE

To set properties that can be useful for the user of the Resolver.

setProperty( $name,  $value) 

Arguments

$name

$value

Properties

name

name : 

Type(s)

_isInstalled

_isInstalled : 

Type(s)

_canBeInstalled

_canBeInstalled : 

Type(s)

currentVersion

currentVersion : 

Type(s)

action

action : 

Type(s)

nextVersion

nextVersion : 

Type(s)

properties

properties : 

Type(s)

dependencies

dependencies : 

Type(s)

alternativeDependencies

alternativeDependencies : 

Type(s)

incompatibilities

incompatibilities : 

Type(s)