\Composer\DependencyResolverRuleWatchNode

Wrapper around a Rule which keeps track of the two literals it watches

Used by RuleWatchGraph to store rules in two RuleWatchChains.

Summary

Methods
Properties
Constants
__construct()
watch2OnHighest()
getRule()
getOtherWatch()
moveWatch()
$watch1
$watch2
No constants found
No protected methods found
$rule
N/A
No private methods found
No private properties found
N/A

Properties

$watch1

$watch1 : 

Type

$watch2

$watch2 : 

Type

$rule

$rule : 

Type

Methods

__construct()

__construct(\Composer\DependencyResolver\Rule  $rule) 

Creates a new node watching the first and second literals of the rule.

Parameters

\Composer\DependencyResolver\Rule $rule

The rule to wrap

watch2OnHighest()

watch2OnHighest(\Composer\DependencyResolver\Decisions  $decisions) 

Places the second watch on the rule's literal, decided at the highest level

Useful for learned rules where the literal for the highest rule is most likely to quickly lead to further decisions.

Parameters

\Composer\DependencyResolver\Decisions $decisions

The decisions made so far by the solver

getOtherWatch()

getOtherWatch(integer  $literal) : integer

Given one watched literal, this method returns the other watched literal

Parameters

integer $literal

The watched literal that should not be returned

Returns

integer —

A literal

moveWatch()

moveWatch(integer  $from, integer  $to) 

Moves a watch from one literal to another

Parameters

integer $from

The previously watched literal

integer $to

The literal to be watched now