|
@ -91,6 +91,7 @@ class Compiler implements \App\Engine\ICompile |
|
|
|
|
|
|
|
|
$document = $this->pass_0($documents, $options); |
|
|
$document = $this->pass_0($documents, $options); |
|
|
$this->pass_1($document, $options); |
|
|
$this->pass_1($document, $options); |
|
|
|
|
|
$this->pass_2($document, $options); |
|
|
|
|
|
|
|
|
return $document; |
|
|
return $document; |
|
|
|
|
|
|
|
@ -239,6 +240,19 @@ class Compiler implements \App\Engine\ICompile |
|
|
return $variables; |
|
|
return $variables; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Compiler Pass 2 - Run all remaining functions in the resulting document, |
|
|
|
|
|
* mutating the passed in document as required. |
|
|
|
|
|
* |
|
|
|
|
|
* @param Document $document |
|
|
|
|
|
* @param IOptions $options |
|
|
|
|
|
* @return void |
|
|
|
|
|
*/ |
|
|
|
|
|
protected function pass_2(Document $document, IOptions $options): void |
|
|
|
|
|
{ |
|
|
|
|
|
$this->runFunctions($document); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Performs a basic recursive merge of two dom trees with target overwriting |
|
|
* Performs a basic recursive merge of two dom trees with target overwriting |
|
|
* original. |
|
|
* original. |
|
|