class eZOwtClientController { /* Access the one and only * controller instance */ function &getGlobalController() { static $controller; if (!isSet($controller)) { $controller = new eZOwtClientController(); } return $controller; } /* the 'start' state transition message */ function start() { // perform post installation checks $ok = eZOwtPostInstall::check(); if (!$ok) { print "Post install checks failed. Check error.log\n"; exit; } // show login dialog $this->_loginWindow =& new OWTLogin(); $this->_loginWindow->show(); /* Run the main loop. */ $this->setState( OWT_CONTROLLER_STATUS_LOGIN); Gtk::main(); } function loginComplete($firstTime) { // notification when the login window // is closed } ... }