<?php
 namespace App\Core\Vm; use App\Core\Product\ProductInterface; class VmManager { protected array $modules = []; public function register(string $name, ProductInterface $module): void { $this->modules[$name] = $module; } public function get(string $name): ProductInterface { if (! isset($this->modules[$name])) { throw new \Exception("VM modülü bulunamadı: {$name}"); } return $this->modules[$name]; } public function getAll(): array { return $this->modules; } public function has(string $name): bool { return isset($this->modules[$name]); } } 