public function getInstance() { if (self::$oInstance == null) { self::$oInstance = new FlexiRemoteJSONServer(); } return self::$oInstance; }
public static function getRemoteServer() { $sCallType = FlexiController::getInstance()->getRequest("_type", "json"); $sCallType = empty($sCallType) ? "json" : $sCallType; switch ($sCallType) { case "json": return FlexiRemoteJSONServer::getInstance(); break; default: throw new FlexiException("Unknown Remote call-type: " . $sCallType, ERROR_UNKNOWNTYPE); } return null; }