[mapserver-commits] r10966 - trunk/mapserver/mapscript/php
svn at osgeo.org
svn at osgeo.org
Mon Feb 7 13:30:03 EST 2011
Author: aboudreault
Date: 2011-02-07 10:30:03 -0800 (Mon, 07 Feb 2011)
New Revision: 10966
Modified:
trunk/mapserver/mapscript/php/layer.c
Log:
Removed GetFeature() method in PHP/MapScript
Modified: trunk/mapserver/mapscript/php/layer.c
===================================================================
--- trunk/mapserver/mapscript/php/layer.c 2011-02-07 18:24:41 UTC (rev 10965)
+++ trunk/mapserver/mapscript/php/layer.c 2011-02-07 18:30:03 UTC (rev 10966)
@@ -82,11 +82,6 @@
ZEND_ARG_OBJ_INFO(0, extent, rectObj, 0)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO_EX(layer_getFeature_args, 0, 0, 1)
- ZEND_ARG_INFO(0, shapeindex)
- ZEND_ARG_INFO(0, tileindex)
-ZEND_END_ARG_INFO()
-
ZEND_BEGIN_ARG_INFO_EX(layer_addFeature_args, 0, 0, 1)
ZEND_ARG_OBJ_INFO(0, shape, shapeObj, 0)
ZEND_END_ARG_INFO()
@@ -966,7 +961,7 @@
/* }}} */
/* {{{ proto int layer.open()
- Open the layer for use with getFeature(). Returns MS_SUCCESS/MS_FAILURE. */
+ Open the layer for use with getShape(). Returns MS_SUCCESS/MS_FAILURE. */
PHP_METHOD(layerObj, open)
{
zval *zobj = getThis();
@@ -1082,49 +1077,6 @@
}
/* }}} */
-/* {{{ proto shapeObj layer.getFeature(shapeindex, [tileindex])
- Retrieve shapeObj from a layer by index. */
-PHP_METHOD(layerObj, getFeature)
-{
- zval *zobj = getThis();
- long shapeindex, tileindex = -1;
- shapeObj *shape = NULL;
- php_layer_object *php_layer;
-
- PHP_MAPSCRIPT_ERROR_HANDLING(TRUE);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l",
- &shapeindex, &tileindex) == FAILURE) {
- PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
- return;
- }
- PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE);
-
- php_layer = (php_layer_object *) zend_object_store_get_object(zobj TSRMLS_CC);
-
-
- /* Create a new shapeObj to hold the result
- * Note that the type used to create the shape (MS_NULL) does not matter
- * at this point since it will be set by SHPReadShape().
- */
- if ((shape = shapeObj_new(MS_SHAPE_NULL)) == NULL)
- {
- mapscript_throw_mapserver_exception("Failed creating new shape (out of memory?)" TSRMLS_CC);
- return;
- }
-
- if (layerObj_getShape(php_layer->layer, shape, tileindex, shapeindex) != MS_SUCCESS)
- {
- shapeObj_destroy(shape);
- mapscript_throw_mapserver_exception("" TSRMLS_CC);
- return;
- }
-
- /* Return valid object */
- MAPSCRIPT_MAKE_PARENT(NULL, NULL);
- mapscript_create_shape(shape, parent, php_layer, return_value TSRMLS_CC);
-}
-/* }}} */
-
/* {{{ proto int layer.getExtent()
Retrieve or calculate a layer's extents. */
PHP_METHOD(layerObj, getExtent)
@@ -1962,7 +1914,6 @@
PHP_ME(layerObj, whichShapes, layer_whichShapes_args, ZEND_ACC_PUBLIC)
PHP_ME(layerObj, nextShape, NULL, ZEND_ACC_PUBLIC)
PHP_ME(layerObj, close, NULL, ZEND_ACC_PUBLIC)
- PHP_ME(layerObj, getFeature, layer_getFeature_args, ZEND_ACC_PUBLIC)
PHP_ME(layerObj, getExtent, NULL, ZEND_ACC_PUBLIC)
PHP_ME(layerObj, addFeature, layer_addFeature_args, ZEND_ACC_PUBLIC)
PHP_ME(layerObj, getMetaData, layer_getMetaData_args, ZEND_ACC_PUBLIC)
More information about the mapserver-commits
mailing list