repository[$key] ?? null; } public function set($key, /* mixed */ $value): ManagerModel { $this->repository[$key] = $value; return $this; } public function isset($key): bool { return \array_key_exists($key, $this->repository); } /** * Возвращает action по его имени */ public function __get(string $name) /* : mixed */ { $key = \str_replace(['ForkBB\\Models\\', 'ForkBB\\', '\\'], '', \get_class($this)); return $this->c->{$key . \ucfirst($name)}->setManager($this); } /** * Выполняет подгружаемый метод при его наличии */ public function __call(string $name, array $args) /* : mixed */ { return $this->__get($name)->$name(...$args); } }