Closed haydenyoung closed 7 years ago
With Joomla 3.3.3, I get this fatal error - Fatal error: Call to a member function attach() on a non-object in /var/www/html/j3-api/libraries/joomla/event/event.php on line 39
Closing this. The plugin architecture is ideal when you have multiple plugins "listening" to an event, and each plugin sequentially receives an object and work on in.
In this case, we're only using plugins as a container to install the API resources and for parameters. Considering that, I feel it needs a more deeper thought on how we should be using the plugin infrastructure.
Extend JPlugin rather than JObject for API plugin class. My recommendation would also be to replace fetchResource with an event method, E.g. onAPIFetchResource and to remove getInstance to more closely match Joomla's plugin conventions.
Please let me know if you would like me to make these changes.