class Problem (View source)

Represents a problem detected while solving dependencies

Properties

protected array $reasonSeen A map containing the id of each rule part of this problem as a key
protected array $reasons A set of reasons for the problem, each is a rule or a job and a rule
protected $section
protected $pool

Methods

__construct(Pool $pool)

No description

addRule(Rule $rule)

Add a rule as a reason

array
getReasons()

Retrieve all reasons for this problem

string
getPrettyString(array $installedMap = array())

A human readable textual representation of the problem's reasons

addReason(string $id, string $reason)

Store a reason descriptor but ignore duplicates

nextSection()

No description

string
jobToText(array $job)

Turns a job into a human readable description

getPackageList($packages)

No description

string
constraintToText(ConstraintInterface $constraint)

Turns a constraint into text usable in a sentence describing a job

Details

__construct(Pool $pool)

Parameters

Pool $pool

addRule(Rule $rule)

Add a rule as a reason

Parameters

Rule $rule A rule which is a reason for this problem

array getReasons()

Retrieve all reasons for this problem

Return Value

array The problem's reasons

string getPrettyString(array $installedMap = array())

A human readable textual representation of the problem's reasons

Parameters

array $installedMap A map of all installed packages

Return Value

string

protected addReason(string $id, string $reason)

Store a reason descriptor but ignore duplicates

Parameters

string $id A canonical identifier for the reason
string $reason The reason descriptor

nextSection()

protected string jobToText(array $job)

Turns a job into a human readable description

Parameters

array $job

Return Value

string

protected getPackageList($packages)

Parameters

$packages

protected string constraintToText(ConstraintInterface $constraint)

Turns a constraint into text usable in a sentence describing a job

Parameters

ConstraintInterface $constraint

Return Value

string