src/Resolver/FileResolver.php
public function resolve($templatePath)
    {
        $templatePathReal = realpath($templatePath);

        if ($templatePathReal === false) {
            throw new \Exception(
                'Template file does not exist: ' . $templatePath
            );
        }

        if ($this->hasCache($templatePathReal)) {
            return $this->getCache($templatePathReal);
        }

        $template = file_get_contents(
            $templatePathReal
        );

        $this->setCache($templatePathReal, $template);

        return $template;
    }
public function resolve($templatePath)
    {
        $templatePathReal = realpath($templatePath);

        if ($templatePathReal === false) {
            throw new \Exception(
                'Template file does not exist: ' . $templatePath
            );
        }

        if ($this->hasCache($templatePathReal)) {
            return $this->getCache($templatePathReal);
        }

        $template = file_get_contents(
            $templatePathReal
        );

        $this->setCache($templatePathReal, $template);

        return $template;
    }
public function resolve ( $ templatePath ) { $ templatePathReal = realpath ( $ templatePath ) ; if ( $ templatePathReal === false ) { throw new \ Exception ( 'Template file does not exist: ' . $ templatePath ) ; } if ( $ this -> hasCache ( $ templatePathReal ) ) { return $ this -> getCache ( $ templatePathReal ) ; } $ template = file_get_contents ( $ templatePathReal ) ; $ this -> setCache ( $ templatePathReal , $ template ) ; return $ template ; }
Resolve a template name to mustache content or a set of tokens.

@param string $templatePath

@return array|bool|null|string
@throws \Exception
@throws \Psr\SimpleCache\InvalidArgumentException
Resolve a template name to mustache content or a set of tokens .