public static function &factory($key, array $params = [], $store = true) {
        if (static::has($key)) {
            return static::get($key);
        }

        $namespace = Path::toNamespace($key);
        $reflection = new ReflectionClass($namespace);
        $object = $reflection->newInstanceArgs($params);

        if ($store) {
            $object = static::set($object, $key);
        }

        return $object;
    }