|
@@ 633-643 (lines=11) @@
|
| 630 |
|
* @return string Path and filename of layout files |
| 631 |
|
* @throws Exception\InvalidTemplateResourceException |
| 632 |
|
*/ |
| 633 |
|
public function getLayoutPathAndFilename($layoutName = 'Default') |
| 634 |
|
{ |
| 635 |
|
$format = $this->getFormat(); |
| 636 |
|
$layoutName = ucfirst($layoutName); |
| 637 |
|
$layoutKey = $layoutName . '.' . $format; |
| 638 |
|
if (!array_key_exists($layoutKey, self::$resolvedFiles[self::NAME_LAYOUTS])) { |
| 639 |
|
$paths = $this->getLayoutRootPaths(); |
| 640 |
|
self::$resolvedFiles[self::NAME_LAYOUTS][$layoutKey] = $this->resolveFileInPaths($paths, $layoutName, $format); |
| 641 |
|
} |
| 642 |
|
return self::$resolvedFiles[self::NAME_LAYOUTS][$layoutKey]; |
| 643 |
|
} |
| 644 |
|
|
| 645 |
|
/** |
| 646 |
|
* Returns a unique identifier for the resolved partial file. |
|
@@ 683-693 (lines=11) @@
|
| 680 |
|
* @return string the full path which should be used. The path definitely exists. |
| 681 |
|
* @throws InvalidTemplateResourceException |
| 682 |
|
*/ |
| 683 |
|
public function getPartialPathAndFilename($partialName) |
| 684 |
|
{ |
| 685 |
|
$format = $this->getFormat(); |
| 686 |
|
$partialKey = $partialName . '.' . $format; |
| 687 |
|
if (!array_key_exists($partialKey, self::$resolvedFiles[self::NAME_PARTIALS])) { |
| 688 |
|
$paths = $this->getPartialRootPaths(); |
| 689 |
|
$partialName = ucfirst($partialName); |
| 690 |
|
self::$resolvedFiles[self::NAME_PARTIALS][$partialKey] = $this->resolveFileInPaths($paths, $partialName, $format); |
| 691 |
|
} |
| 692 |
|
return self::$resolvedFiles[self::NAME_PARTIALS][$partialKey]; |
| 693 |
|
} |
| 694 |
|
|
| 695 |
|
/** |
| 696 |
|
* @param array $paths |