node = $node; $this->subjectName = $subjectName; } public function __invoke($object): string { $context = new RenderingContext(new DummyView()); $context->getVariableProvider()->add($this->subjectName, $object); return \trim($this->node->evaluate($context)); } }