Mixin class providing parameter patching and text processing for the Object class in Objects.py.
ObjPatch resolves $term$ placeholders in strings by looking up values from database parameters, user attributes, package configuration, date/time functions, and system context. It is mixed into Object via Python MRO and requires no __init__.
| Method | Description |
|---|---|
patch_all(term, key, value) |
Simple string replacement of key with value in term |
patch_paramBuffer(term) |
Resolve term against the cached def_Parameter table |
patch_paramRun(term, depth, local_db) |
Resolve a single placeholder supporting user, package, date/time, UTM, IP geo, and config lookups |
patch_param(term, depth) |
Split on $ delimiters and resolve all placeholders via patch_paramRun |
process_text(text) |
Patch placeholders then apply ObjProcessText transformations |
$date$, $year$, $month$, $day$, $now$, $today$, $yesterday$, $time$, $week$, $firstday$, $lastday$$user$, $userlevel$, $usergroup$, $userloggedin$, and dynamic user attributes$package$, $package_*$ for package table fields and palette lookups$guid$, $reference$, $siteurl$, $basedir$, $serverport$, $sitename$$agent$, $os$, $browser$, $referer$$clientip$, $remoteip$, $localip$, $ipcountrycode$, $ipcity$, etc.$utmmedium$, $utmcampaign$, $utmsource$This class has no __init__ and no base class. All self.* references (e.g. self.debug(), self.DB, self.get_package(), self.sql_get_dict()) are resolved at runtime through the MRO chain when mixed into Object.
from Objects import Object
obj = Object()
result = obj.patch_param("Today is $date$ for $package$")
result = obj.process_text("Hello $user$")