Fatal error: Call to a member function (eventRegister) on a non-object..