($p['category'] ?? '') === $category)); } /** * Récupère un projet par son slug */ function getProjectBySlug(string $slug): ?array { foreach (getProjects() as $project) { if (($project['slug'] ?? '') === $slug) { return $project; } } return null; } /** * Récupère les technologies uniques de tous les projets */ function getAllTechnologies(): array { $technologies = []; foreach (getProjects() as $project) { foreach ($project['technologies'] ?? [] as $tech) { if (!in_array($tech, $technologies, true)) { $technologies[] = $tech; } } } sort($technologies); return $technologies; }