* @static * * @return none */ public static function addRoleEnvironmentStoppingListener($listener) { self::$_stoppingListeners[] = $listener; } /** * Removes an event listener for the Stopping event. * * @param function $listener The stopping listener. * * @static * * @return bool */ public static function removeRoleEnvironmentStoppingListener($listener) { foreach (self::$_stoppingListeners as $key => $stoppingListener) { if ($stoppingListener == $listener) { unset(self::$_stoppingListeners[$key]); return true; } } return false; } } // Initialize static fields RoleEnvironment::init();