| @@ 63-76 (lines=14) @@ | ||
| 60 | * |
|
| 61 | * @return string as path to the template file |
|
| 62 | */ |
|
| 63 | public function getTemplateFile($template) |
|
| 64 | { |
|
| 65 | $paths = $this->config["path"]; |
|
| 66 | $suffix = $this->config["suffix"]; |
|
| 67 | ||
| 68 | foreach ($paths as $path) { |
|
| 69 | $file = $path . "/" . $template . $suffix; |
|
| 70 | if (is_file($file)) { |
|
| 71 | return $file; |
|
| 72 | } |
|
| 73 | } |
|
| 74 | ||
| 75 | throw new Exception("Could not find template file '$template'."); |
|
| 76 | } |
|
| 77 | ||
| 78 | ||
| 79 | ||
| @@ 31-44 (lines=14) @@ | ||
| 28 | * |
|
| 29 | * @return string as path to the template file |
|
| 30 | */ |
|
| 31 | public function getTemplateFile($template) |
|
| 32 | { |
|
| 33 | $paths = $this->config["path"]; |
|
| 34 | $suffix = $this->config["suffix"]; |
|
| 35 | ||
| 36 | foreach ($paths as $path) { |
|
| 37 | $file = $path . "/" . $template . $suffix; |
|
| 38 | if (is_file($file)) { |
|
| 39 | return $file; |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| 43 | throw new Exception("Could not find template file '$template'."); |
|
| 44 | } |
|
| 45 | ||
| 46 | ||
| 47 | ||