<?php
 namespace App\Core\Product; class ProductManager { protected $modules = []; public function register($name, ProductInterface $module) { $this->modules[$name] = $module; } public function get($name) { if (! isset($this->modules[$name])) { throw new \Exception("Ürün modülü bulunamadı: $name"); } return $this->modules[$name]; } public function getAll() { return $this->modules; } public function has($name) { return isset($this->modules[$name]); } } 