protected function findTemplate(string $templatesPath, string $package, string $templateName): string
    {
        if (!empty($package)) {
            // /templates/default/vendor/module/template.php
            $templatePath = 
                $templatesPath . 
                $this->config->templatesDefault . 
                '/' . strtolower($package) . 
                '/' . str_replace('.', '/', $templateName) . $this->extension;
            if (file_exists($templatePath)) {
                return $templatePath;
            }
        }
        
        // /templates/default/template.php
        $templatePath = 
            $templatesPath . 
            $this->config->templatesDefault . 
            '/' . str_replace('.', '/', $templateName) . $this->extension;
        return $templatePath;
    }
protected function findTemplate(string $templatesPath, string $package, string $templateName): string
    {
        if (!empty($package)) {
            // /templates/default/vendor/module/template.php
            $templatePath = 
                $templatesPath . 
                $this->config->templatesDefault . 
                '/' . strtolower($package) . 
                '/' . str_replace('.', '/', $templateName) . $this->extension;
            if (file_exists($templatePath)) {
                return $templatePath;
            }
        }
        
        // /templates/default/template.php
        $templatePath = 
            $templatesPath . 
            $this->config->templatesDefault . 
            '/' . str_replace('.', '/', $templateName) . $this->extension;
        return $templatePath;
    }
protected function findTemplate ( string $ templatesPath , string $ package , string $ templateName ) : string { if ( ! empty ( $ package ) ) { // /templates/default/vendor/module/template.php $ templatePath = $ templatesPath . $ this -> config -> templatesDefault . '/' . strtolower ( $ package ) . '/' . str_replace ( '.' , '/' , $ templateName ) . $ this -> extension ; if ( file_exists ( $ templatePath ) ) { return $ templatePath ; } } // /templates/default/template.php $ templatePath = $ templatesPath . $ this -> config -> templatesDefault . '/' . str_replace ( '.' , '/' , $ templateName ) . $ this -> extension ; return $ templatePath ; }
Find full path for requested template. Returned path may not exists.
@param string $templatesPath
@param string $package
@param string $templateName
@return string
Find full path for requested template . Returned path may not exists .