public function module($module)
    {
        if (is_object($module)) {
            if (!($module instanceof ModuleInterface)) {
                $moduleType = get_class($module);

                throw new InvalidArgumentException("Given module object '$moduleType' does not implement 'Depend\\Abstraction\\ModuleInterface'");
            }

            $module->register($this);

            return $this;
        }

        if (!class_exists((string) $module)) {
            throw new InvalidArgumentException("Given class name '$module' could not be found");
        }

        return $this->module(new $module);
    }