Categories > TinyButStrong general >

Merge using object methods

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: RwD
Date: 2006-05-04
Time: 13:39

Merge using object methods

Hi!

Now that tbs 3.0 is out, it is a nice moment to add some functionality that is really missing. Now that I am building everything object oriented I have my translator object. But when I try to use a user funtion in the mergefield method of tbs I cannot use the object method :(

So right no I need to define a global function that calls my object. Could you please fix this?
By: RwD
Date: 2006-05-04
Time: 13:40

Re: Merge using object methods

It is sort of like the same I asked here, where you've already added it: http://tinybutstrong.com/forum.php?msg_id=4991
By: Skrol29
Date: 2006-05-04
Time: 14:04

Re: Merge using object methods

Hi,

It should work fine with TBS 3.0.
class oExample{
  function MrgFld($subname,&$prm) {
    return "#".$subname."#";
  }
}
...
$TBS->MergeField('zzz','oExample.MrgFld',true);