MgFeatureCommandCollection object. This can contain commands to insert, delete, or update features in an FDO data source. The commands are executed sequentially. For FDO providers that support transaction processing, the commands can be treated as a single transaction.
To change data in a feature source, create anFeature commands can be one of the following:
MgFeatureService::UpdateFeatures(). The feature class name and property names in any of the feature commands must match the class name and property names in the feature source.
To execute the commands, callID, execute the following:
For example, to delete all features in a feature class with an identity property$commands = new MgFeatureCommandCollection();
$deleteCommand = new MgDeleteFeatures($className, "ID like '%'");
$commands->Add($deleteCommand);
$featureService->UpdateFeatures($featureSource, $commands, false);
MgPropertyCollection object that contains the properties of the new feature. Create an MgInsertFeatures object and add this to the MgFeatureCommandCollection object.
To insert features, create anFor example, to add a new feature with a single geometry property, execute the following:
$commands = new MgFeatureCommandCollection();
$properties = new MgPropertyCollection();
$agfByteStream = $agfReaderWriter->Write($geometry);
$geometryProperty = new MgGeometryProperty($propertyName,
$agfByteStream);
$properties->Add($geometryProperty);
$insertCommand = new MgInsertFeatures($className, $properties);
$commands->Add($insertCommand);
$featureService->UpdateFeatures($featureSource, $commands, false);
MgPropertyCollection object that contains the new values for the properties and a filter expression that selects the correct feature or features. See Querying Feature Data for details about filter expressions.
To update existing features, create an