예제 #1
0
 *        summary="Sets the specified resource data item for the given resource",
 *        tags={"session"},
 *          @SWG\Parameter(name="session", in="path", required=true, type="string", description="Your MapGuide Session ID"),
 *          @SWG\Parameter(name="resName", in="path", required=true, type="string", description="The resource name (including extension)"),
 *          @SWG\Parameter(name="dataName", in="path", required=true, type="string", description="The name of the resource data to retrieve"),
 *          @SWG\Parameter(name="type", in="formData", required=true, type="string", description="The type of resource data", enum={"File", "Stream", "String"}),
 *          @SWG\Parameter(name="data", in="formData", required=true, type="file", description="The resource data file to load"),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
 */
$app->post("/session/:sessionId/:resName/data/:dataName", function ($sessionId, $resName, $dataName) use($app) {
    $resId = new MgResourceIdentifier("Session:{$sessionId}//{$resName}");
    $ctrl = new MgResourceServiceController($app);
    $ctrl->SetResourceData($resId, $dataName);
});
/**
 *     @SWG\Delete(
 *        path="/session/{session}/{resName}/data/{dataName}",
 *        operationId="DeleteResourceData",
 *        summary="Delete the specified resource data item for the given resource",
 *        tags={"session"},
 *          @SWG\Parameter(name="session", in="path", required=true, type="string", description="Your MapGuide Session ID"),
 *          @SWG\Parameter(name="resName", in="path", required=true, type="string", description="The resource name (including extension)"),
 *          @SWG\Parameter(name="dataName", in="path", required=true, type="string", description="The name of the resource data to retrieve"),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
 */