I create my mini-micro framework. In my class which loads template I have property named $variable. This property stores array of viariables which should be available in my template.

For example:

$this->variable = array($key=>5, $data=>10);

Next, I use function extract()


So, now in my template(test.html.php) I have simple access to passed variables:


echo $key;

I also have method named import(). In my template I have access for this method by operator $this



Is there any possibility to call my function import() in template, without operator $this?

Related posts

Recent Viewed