Added support for Foo::$onEvent methods [closes #3]