public static function getInstance($key = 'default', array $params = []) {
        $class = get_called_class();

        if (isset(static::$_instances[$class][$key])) {
            return static::$_instances[$class][$key];
        }

        $reflection = new ReflectionClass($class);
        $object = $reflection->newInstanceArgs($params);

        static::$_instances[$class][$key] = $object;

        return $object;
    }