My newest project that I'm looking to build with PHP (likely CodeIgniter) would require some sort of system that would allow a user to drag and drop pre-defined functions/methods into mini-classes/objects and then run/test them in the browser.
So it'd something similar to Scratch. I've designed a relational database that I think could work for this (storing the function names and have these classes "subscribe" to those functions) - but I'm wondering whether or not to go ahead with it.
Is there a better way to do this or is there a system out there that would accomplish this for me?
EDIT: It would have to be extremely simple for an end user, but hopefully be flexible enough to easily add more complex functionality in the future.