Skip to main content
Glama

CTX: Context as Code (CaC) tool

by context-hub
MIT License
235
  • Apple
  • Linux
AbstractExclusion.php926 B
<?php declare(strict_types=1); namespace Butschster\ContextGenerator\Config\Exclude; /** * Base class for all exclusion patterns */ abstract readonly class AbstractExclusion implements ExclusionPatternInterface { /** * @param string $pattern Exclusion pattern value */ public function __construct( protected string $pattern, ) {} /** * Get the raw pattern string */ public function getPattern(): string { return $this->pattern; } /** * Abstract method to check if a path matches this pattern */ abstract public function matches(string $path): bool; /** * Normalize a pattern for consistent comparison */ protected function normalizePattern(string $pattern): string { $pattern = \preg_replace('#^\./#', '', $pattern); // Remove trailing slash return \rtrim((string) $pattern, '/'); } }

MCP directory API

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