Thanks again for your testing and input.
I will run some more tests before I update the SVN.
On Jun 5, 5:38 am, "Anderson A. Meggiolaro" <
ameggiol...@gmail.com>
wrote:
> Hello again,
>
> I would like to report an issue I found in some tests I've done with
> plugins.
>
> The problem happens when I use a class as plugin insted of a function.
>
> As I saw in the file *sysplugins/internal.plugin_handler.php* (line 48), the
> method *execute *in the end user plugins is called static
> (plugin_name::execute). I think we need to instantiate the plugin first, and
> then call the method *execute*, because doing that we are able to access the
> varialbe *$this* in the plugin object, in which I found a lot of utilities
> that *$compiler* passed param doesn't had, I'll show you some examples:
>
> a) By calling it static we won't be able to detect if the plugin is a block,
> like for|forelse|forclose
> b) By calling it static we won't be able use *required_attributes* and *
> optional_attributes*
> c) By calling it static we won't be able to use all the methods and
> properties inherited from the base class.
>
> and so on..
>
> I fixed it just for test by changing this piece of code in *
> sysplugins/internal.plugin_handler.php* (line 48):
> *$plugin = array($plugin, 'execute');*
>
> by that
> *$plugin = array(new $plugin, 'execute');*