How can I call a plugin?



I’m developing a plugin that reads a cookie, retrieves some information, sends it to an external service and the information will be returned when an SQL statement to the database.

I have taken methods “RankingQuery.php” and I made the judgment that is made directly without adding “generateQuery ()”.

All these I have gotten into a new pluggin, but do not know how to run the pluggin when I want, for example in the log in.

For now I just have to show me a “echo ‘hello world’” in my controller calling a method of my pluggin, but not like calling piwik plugin to run.