public function register($class)
    {
        if ($this->initialized) {
            throw new RuntimeException(
                'The components have already been initialized.'
            );
        }
        if (! class_exists($class)) {
            throw new RuntimeException(sprintf(
                'The component "%s" not exists.',
                $class
            ));
        }
        $component = new $class();
        if (! $component instanceof ComponentInterface) {
            throw new InvalidArgumentException(sprintf(
                'The component "%s" must implement "%s".',
                $class,
                ComponentInterface::CLASS
            ));
        }

        $this->container[$class] = $component;

        return md5($class . $component->getVersion());
    }