public function resolveTemplateFileForControllerAndActionAndFormat($controller, $action, $format = null)
    {
        if ($this->templatePathAndFilename) {
            return $this->templatePathAndFilename;
        }

        $action = ucfirst($action);

        $paths = $this->getTemplateRootPaths();
        if (isset($this->options['templatePathAndFilenamePattern'])) {
            $paths = $this->expandGenericPathPattern($this->options['templatePathAndFilenamePattern'], array_merge($this->patternReplacementVariables, [
                'controllerName' => $controller,
                'action' => $action,
                'format' => ($format !== null ? $format : $this->patternReplacementVariables['format'])
            ]), false, false);
        }

        foreach ($paths as $path) {
            if (is_file($path)) {
                return $path;
            }
        }

        throw new Exception\InvalidTemplateResourceException('Template could not be loaded. I tried "' . implode('", "', $paths) . '"', 1225709595);
    }
public function resolveTemplateFileForControllerAndActionAndFormat($controller, $action, $format = null)
    {
        if ($this->templatePathAndFilename) {
            return $this->templatePathAndFilename;
        }

        $action = ucfirst($action);

        $paths = $this->getTemplateRootPaths();
        if (isset($this->options['templatePathAndFilenamePattern'])) {
            $paths = $this->expandGenericPathPattern($this->options['templatePathAndFilenamePattern'], array_merge($this->patternReplacementVariables, [
                'controllerName' => $controller,
                'action' => $action,
                'format' => ($format !== null ? $format : $this->patternReplacementVariables['format'])
            ]), false, false);
        }

        foreach ($paths as $path) {
            if (is_file($path)) {
                return $path;
            }
        }

        throw new Exception\InvalidTemplateResourceException('Template could not be loaded. I tried "' . implode('", "', $paths) . '"', 1225709595);
    }
public function resolveTemplateFileForControllerAndActionAndFormat ( $ controller , $ action , $ format = null ) { if ( $ this -> templatePathAndFilename ) { return $ this -> templatePathAndFilename ; } $ action = ucfirst ( $ action ) ; $ paths = $ this -> getTemplateRootPaths ( ) ; if ( isset ( $ this -> options [ 'templatePathAndFilenamePattern' ] ) ) { $ paths = $ this -> expandGenericPathPattern ( $ this -> options [ 'templatePathAndFilenamePattern' ] , array_merge ( $ this -> patternReplacementVariables , [ 'controllerName' => $ controller , 'action' => $ action , 'format' => ( $ format !== null ? $ format : $ this -> patternReplacementVariables [ 'format' ] ) ] ) , false , false ) ; } foreach ( $ paths as $ path ) { if ( is_file ( $ path ) ) { return $ path ; } } throw new Exception \ InvalidTemplateResourceException ( 'Template could not be loaded. I tried "' . implode ( '", "' , $ paths ) . '"' , 1225709595 ) ; }
Resolves a template file based on the given controller and action,
together with eventually defined patternReplacementVariables.

@param string $controller
@param string $action
@param string $format
@return mixed|string
@throws Exception\InvalidTemplateResourceException
Resolves a template file based on the given controller and action together with eventually defined patternReplacementVariables .