public function enter($name, $type) { if (!$this->renderingSnippets) { return; } $obStarted = FALSE; if ($this->nestingLevel === 0 && $this->bridge->needsRedraw($name) || $type === self::TYPE_DYNAMIC && ($previous = end($this->stack)) && $previous[1] === TRUE) { ob_start(function () { }); $this->nestingLevel = $type === self::TYPE_AREA ? 0 : 1; $obStarted = TRUE; } elseif ($this->nestingLevel > 0) { $this->nestingLevel++; } $this->stack[] = [$name, $obStarted]; $this->bridge->markRedrawn($name); }