container = $container; return $this; } public function getContainer(): ContainerInterface { return $this->container; } public function find(ModelInterface $model_name): Repository { $class = str_replace('Model', 'Repository', get_class($model_name)); return $this->getContainer()->get($class); } }