private function resolvePartialPath($viewPath)
    {
        $tempViewPath = str_replace($this->getPartialsDir(), '', $viewPath);

        if (strpos($tempViewPath, '../') === 0 || strpos($tempViewPath, '/../') === 0) {
            return $this->resolveRelativePath($tempViewPath);
        } else if (strpos($tempViewPath, './') === 0) {
            return $this->resolveLocalPath($tempViewPath);
        } else if (!in_array(dirname($tempViewPath), ['.','..'])
            && file_exists(dirname($tempViewPath))) {
            return $tempViewPath;
        }

        return $this->resolveGlobalPath($tempViewPath);
    }