protected function resolveModule($template, $module)
    {
        $fullName = $module . '::' . $template;
        if (isset($this->templatesMap[$fullName])) {
            $file = $this->normalizePath($this->templatesMap[$fullName]);
            if (! file_exists($file)) {
                throw new RuntimeException(sprintf(
                    'The file "%s" of template "%s" not exists.',
                    $file,
                    $template
                ));
            }

            return $file;
        }

        return $this->findFile($module, $template);
    }