| @@ 275-289 (lines=15) @@ | ||
| 272 | * @param string path of template directory. |
|
| 273 | * @return void |
|
| 274 | * */ |
|
| 275 | function setTemplatePath($path) |
|
| 276 | { |
|
| 277 | if(!$path) return; |
|
| 278 | ||
| 279 | if((strlen($path) >= 1 && substr_compare($path, '/', 0, 1) !== 0) && (strlen($path) >= 2 && substr_compare($path, './', 0, 2) !== 0)) |
|
| 280 | { |
|
| 281 | $path = './' . $path; |
|
| 282 | } |
|
| 283 | ||
| 284 | if(substr_compare($path, '/', -1) !== 0) |
|
| 285 | { |
|
| 286 | $path .= '/'; |
|
| 287 | } |
|
| 288 | $this->template_path = $path; |
|
| 289 | } |
|
| 290 | ||
| 291 | /** |
|
| 292 | * retrieve the directory path of the template directory |
|
| @@ 354-367 (lines=14) @@ | ||
| 351 | * set the directory path of the layout directory |
|
| 352 | * @param string path of layout directory. |
|
| 353 | * */ |
|
| 354 | function setLayoutPath($path) |
|
| 355 | { |
|
| 356 | if(!$path) return; |
|
| 357 | ||
| 358 | if((strlen($path) >= 1 && substr_compare($path, '/', 0, 1) !== 0) && (strlen($path) >= 2 && substr_compare($path, './', 0, 2) !== 0)) |
|
| 359 | { |
|
| 360 | $path = './' . $path; |
|
| 361 | } |
|
| 362 | if(substr_compare($path, '/', -1) !== 0) |
|
| 363 | { |
|
| 364 | $path .= '/'; |
|
| 365 | } |
|
| 366 | $this->layout_path = $path; |
|
| 367 | } |
|
| 368 | ||
| 369 | /** |
|
| 370 | * set the directory path of the layout directory |
|