max = 100; } /** * @param array $config * @param array $construct * @return mixed * @throws Exception */ public function load(mixed $config, array $construct = []): mixed { if (is_object($config)) { return $config; } $object = $this->getFromChannel($name = md5($config), [$config, $construct]); if (method_exists($object, 'clean')) { $object->clean(); } return $object; } /** * @param string $name * @param mixed $config * @return mixed * @throws ReflectionException * @throws NotFindClassException */ public function createClient(string $name, mixed $config): mixed { return Snowflake::createObject(...$config); } /** * @param string $name * @param $object */ public function release(string $name, mixed $object) { $this->push($name, $object); } }