Commit c7fbf266e59fd3da9d020dcfd2d842b4882ad8ec
1 parent
53df7b16
Add the ability to add locations programmatically.
Make KTTemplating a singleton of sorts. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3451 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
14 additions
and
0 deletions
lib/templating/templating.inc.php
| @@ -97,6 +97,20 @@ class KTTemplating { | @@ -97,6 +97,20 @@ class KTTemplating { | ||
| 97 | return new $sClass($sTemplatePath); | 97 | return new $sClass($sTemplatePath); |
| 98 | } | 98 | } |
| 99 | // }}} | 99 | // }}} |
| 100 | + | ||
| 101 | + // {{{ addLocation | ||
| 102 | + function addLocation ($descr, $loc) { | ||
| 103 | + $this->aLocationRegistry[$descr] = $loc; | ||
| 104 | + } | ||
| 105 | + // }}} | ||
| 106 | + | ||
| 107 | + // {{{ getSingleton | ||
| 108 | + function &getSingleton () { | ||
| 109 | + global $oKTTemplating; | ||
| 110 | + return $oKTTemplating; | ||
| 111 | + } | ||
| 112 | + // }}} | ||
| 100 | } | 113 | } |
| 114 | +$oKTTemplating =& new KTTemplating; | ||
| 101 | 115 | ||
| 102 | ?> | 116 | ?> |