/** * Make the compile-magic, build the links on the passed level of the Linker * @param Compiler $compiler To access the arguments and Linker of the Compiler used * @param Linker $linker To appending that on the actual level if it is neccessary */ public function make(Compiler $compiler, Linker $linker) { if (!$this->isAllowed()) { throw new NotAllowedException($this, $this->getParentNode()); } // Checking if this method is not overridden when it called // This is just for debugging/testing purposes if (get_class($this) == get_class()) { $linker->append($this->getToken()->getProcessedData()); } }
/** * Constructor * @param BasicNode $root */ public function __construct(Linker $linker, BasicNode $root) { $this->linker = $linker; $this->root = $root; $this->linker->setCompiler($this); }