SDK Form demonstrator implement field dependency graph

This commit is contained in:
Eric Espie
2025-04-17 17:26:42 +02:00
parent 81a256aa0e
commit a44b7b13f0
3 changed files with 61 additions and 54 deletions

View File

@@ -15,15 +15,14 @@ trait GraphTrait
$this->aChildren[] = $node;
}
public function IsLast(): bool
{
return $this->iPosition === count($this->aChildren) - 1;
public function HasChildren() : bool {
return count($this->aChildren) > 0;
}
/*
* Iterator interface
*/
public function current(): mixed
public function current(): DependencyNode
{
return $this->aChildren[$this->iPosition];
}
@@ -33,7 +32,7 @@ trait GraphTrait
$this->iPosition++;
}
public function key(): mixed
public function key(): int
{
return $this->iPosition;
}