public function addToBottom() { if ($this->captureLock) { throw new \BadFunctionCallException('Cannot nest onLoad captures'); } $this->captureLock = true; \ob_start(); }