示例#1
0
 *        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 feature source name"),
 *          @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}),
 *          @SWG\Parameter(name="schemaName", in="path", required=true, type="string", description="The FDO schema name"),
 *          @SWG\Parameter(name="className", in="path", required=true, type="string", description="The class name"),
 *          @SWG\Parameter(name="body", in="body", required=true, type="string", description="The Feature Set XML describing the features to be inserted"),
 *        @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.FeatureSource/features.:format/:schemaName/:className", function ($sessionId, $resName, $format, $schemaName, $className) use($app) {
    $resId = new MgResourceIdentifier("Session:{$sessionId}//{$resName}.FeatureSource");
    $ctrl = new MgFeatureServiceController($app);
    $ctrl->InsertFeatures($resId, $schemaName, $className, $format);
});
/**
 *     @SWG\Put(
 *        path="/session/{session}/{resName}.FeatureSource/features.{type}/{schemaName}/{className}",
 *        operationId="UpdateFeatures",
 *        summary="Updates one or more features into the given feature class for th specified feature source",
 *        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 feature source name"),
 *          @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}),
 *          @SWG\Parameter(name="schemaName", in="path", required=true, type="string", description="The FDO schema name"),
 *          @SWG\Parameter(name="className", in="path", required=true, type="string", description="The class name"),
 *          @SWG\Parameter(name="body", in="body", required=true, type="string", description="The XML envelope describing the features to be update"),
 *        @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"),