Welcome Guest, Not a member yet? Register   Sign In
using a plugin as a class
#1

[eluser]Trankh1[/eluser]
Hi,

I have seen plugins are naturally used with just methods inside.
I don't manage to use a twitter plugin as a class named twitter and call it's methods.

I want to do that:
- autoload my plugin
- call a method like this: $this->name_plugin->name_method into my HomePage

but i go this error:
Severity: Notice

Message: Undefined property: Homepage::$twitter


How can I do?

Thanks
#2

[eluser]InsiteFX[/eluser]
If it is not a class create it in a helper!

This is in the CodeIgniter User Guide.

InsiteFX
#3

[eluser]Trankh1[/eluser]
My third party code is into a class and i want to use as a plugin.
Indeed i could use it as a library but i think best practice encourage me to use such thing as a plugin because it is not part of my creation.

As for me,
Libraries = my own
Plugins = libraries of others.

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB