We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/context-hub/generator'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
TextBlock.php•685 B
<?php
declare(strict_types=1);
namespace Butschster\ContextGenerator\Lib\Content\Block;
use Butschster\ContextGenerator\Lib\Content\Renderer\RendererInterface;
/**
* Block for plain text content
*/
final readonly class TextBlock extends AbstractBlock
{
public function __construct(string $content, private string $tag = '')
{
parent::__construct($content);
}
public function render(RendererInterface $renderer): string
{
return $renderer->renderTextBlock($this);
}
public function getTag(): string
{
return \trim($this->tag);
}
public function hasTag(): bool
{
return $this->getTag() !== '';
}
}