In my plugin entrance point, the one with callbackDispatch, search patterns, extends Plugin, the one in config.php, etc.  I set two variables from the configuration of the plugin, self::$jasper_server = $this->getConfig()->get('url_jasper_server'); self::$jasper_server_ssl = $this->getConfig()->get('ssl_jasper_server');But they lose scope as soon as my plugin controller loads.  Does the plugin's class, the one that extends Plugin, not stay loaded all the time when accessing a plugin?  The plugin entry point can't be found.  I checked to see what loads first.  The entry point, as expected.If I reference the static variables inside my entry point, I get the value.  As soon as I load my controller, it's gone.  It doesn't know anything about that class, "not found."I also tried putting those in the local function bootstrap().

I found it.  I had to preceed my classname with a slash because I'm using a namespace in my controller.$myurl = \JasperReportPlugin::$jasper_server;

Ahh, but the plugin won't be instantiated when dispatcher is statically calling-back... Ever. Trace the dispatcher entry point, all backend.. no plugins. I may have steered you wrong mate. There must be a way of getting the config globally!

Ahh, namespace bites again.. lol :-)Great work mate!

Write a Reply...