Calling Methods
Brought to you by:
fmarcia
If the $datatree passed to printt or sprintt is an object,
it would be nice if it was possible to do something like
{mask:main}
{method:mymethod}
{arg:ta}{const:a_width}{/arg}
{arg:tb}a{/arg}
{arg:tc}{aa}{/arg}
{/method}
{/mask:main}
which should result in ets calling a method of $datatree
like
$datatree->mymethod($arg_ta, $arg_tb, $arg_tc)
and placing the returned value into the template.
In addition to that, the same with objects in arrays:
{mask:main}
An Array:
{mask:arr}
{method:mymethod}
{arg:ta}somehow place current key here?{/arg}
{arg:tb}xx{/arg}
{/method}
{/mask}
{/mask:main}
resulting in ets calling
$datatree->arr[n]->mymethod($arg_ta, $arg_tb)
Would that be possible to implement?