# xspeed/1.1.3/includes/modules/Mcp/Cli_Output_Buffer.php

xSpeed Cache: AI-Powered Performance Hub with MCP, Caching &amp; CDN, version 1.1.3. 34 lines.

- Page: https://pluginprobe.com/plugins/xspeed/1.1.3/code/includes/modules/Mcp/Cli_Output_Buffer.php
- Raw: https://pluginprobe.com/plugins/xspeed/1.1.3/raw/includes/modules/Mcp/Cli_Output_Buffer.php
- Modified: 2026-07-14T10:10:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/xspeed/1.1.3/code/includes/modules/Mcp/Cli_Output_Buffer.php#L10-L20`.

```php
<?php
/**
 * Output buffer for the MCP CLI bridge — collects the lines a bridged
 * xSpeed CLI command emits (via the \WP_CLI shim) during a run, so the
 * bridge can return them as structured MCP output. See Cli_Shim.
 *
 * @package XSpeed
 */

declare(strict_types=1);

namespace XSpeed\Modules\Mcp;

defined( 'ABSPATH' ) || exit;

final class Cli_Output_Buffer {

	/** @var string[] */
	private $lines = array();

	public function push( string $line ): void {
		$this->lines[] = $line;
	}

	/** @return string[] */
	public function lines(): array {
		return $this->lines;
	}

	public function text(): string {
		return implode( "\n", $this->lines );
	}
}

```
