Thank you for the quick reply and I think from the sample that you gave that you are implying that the the whole class should be stored within the database as a plugin.
Even though I am sure that method would work we diecided to go a slightly different approach being that we would put the class and some logic all contained within a single php file. And the php file was included within the plugin/hook as well as a function call to perform the appropriate tasks that where required.
here is what the plugin/hook looks like:
PHP Code:
//including the php file will the class and logic within it
include("myclass.php");
//call to the function within the php file that just got included
doSomething("param1","param2");