Forums / Cotonti / Support / Help with Xtemplate functions

Dyllon
#1 2012-08-03 17:56

I'm aware that php functions can be called through Xtemplate simply by using {PHP|function_name('param1','param etc')} however I'm curious if it supports functions through classes. For example:

class Example {
	
	function doThis($param1, $param2)
	{
		// do this function
	}

}

Is it possible to create a tag that uses the Example class, and perform the doThis function?

 

We are what we repeatedly do. Excellence then, is not an act, but a habit.
Trustmaster
#2 2012-08-03 19:18

Currently it isn't. It can be added, but it will cost us some lines of code and performance. Is it really necessary or you can make a wrapper function? Also consider that doThis() method in the above example isn't static, so you can't call it without object context.

May the Source be with you!