[mapserver-commits] r11004 - trunk/docs/en/mapscript/php

svn at osgeo.org svn at osgeo.org
Wed Feb 23 16:06:04 EST 2011


Author: aboudreault
Date: 2011-02-23 13:06:04 -0800 (Wed, 23 Feb 2011)
New Revision: 11004

Modified:
   trunk/docs/en/mapscript/php/index.txt
Log:
Updated php/mapscript doc with rfc 65 changes

Modified: trunk/docs/en/mapscript/php/index.txt
===================================================================
--- trunk/docs/en/mapscript/php/index.txt	2011-02-19 23:00:55 UTC (rev 11003)
+++ trunk/docs/en/mapscript/php/index.txt	2011-02-23 21:06:04 UTC (rev 11004)
@@ -861,13 +861,13 @@
 int getNumResults()
     Returns the number of results from this layer in the last query.
 
-resultCacheMemberObj getResult(int index)
-    Returns a resultCacheMemberObj by index from a layer object with 
+resultObj getResult(int index)
+    Returns a resultObj by index from a layer object with 
     index in the range 0 to numresults-1.  
     Returns a valid object or FALSE(0) if index is invalid.
 
 int open()
-    Open the layer for use with getFeature().  
+    Open the layer for use with getShape().  
     Returns MS_SUCCESS/MS_FAILURE.
 
 int whichshapes(rectobj)
@@ -896,13 +896,6 @@
 void close()
     Close layer previously opened with open().
 
-shapeObj getFeature(int shapeindex [, int tileindex = -1])
-    Retrieve shapeObj from a layer by index.
-    Tileindex is optional and is used only for tiled shapefiles 
-    (you get it from the resultCacheMemberObj returned by getResult()
-    for instance). 
-    Simply omit or pass tileindex = -1 for other data sources.
-
 rectObj getExtent()
     Returns the layer's data extents or NULL on error.
     If the layer's EXTENT member is set then this value is used, 
@@ -1019,14 +1012,23 @@
     load by MapServer. For the other connection types this parameter 
     is not used. 
     
-shapeObj resultsGetShape(int shapeindex [, int tileindex = -1])
-    Retrieve shapeObj from a layer's resultset by index.
-    Tileindex is optional and is used only for tiled shapefiles 
-    (you get it from the resultCacheMemberObj returned by getResult()
-    for instance). 
-    Simply omit or pass tileindex = -1 for other data sources.
-    Added in MapServer 5.6.0 due to the one-pass query implementation.
+shapeObj getShape(resultObj result])
+    If the resultObj passed has a valid resultindex, retrieve shapeObj from
+    a layer's resultset. (You get it from the resultObj returned by
+    getResult() for instance). Otherwise, it will do a single query on
+    the layer to fetch the shapeindex
 
+.. code-block:: php
+
+   $map = new mapObj("gmap75.map");
+   $l = $map->getLayerByName("popplace");
+   $l->queryByRect($map->extent);
+   for ($i=0; $i<$l->getNumResults();$i++){
+       $s = $l->getShape($l->getResult($i));
+       echo $s->getValue($l,"Name");
+       echo "\n";
+   }
+
 array getGridIntersectionCoordinates()
     Returns an array containing the grid intersection coordinates. If there
     are no coordinates, it returns an empty array.
@@ -1943,15 +1945,18 @@
     Free the object properties and break the internal references. 
     Note that you have to unset the php variable to free totally the resources.
 
-resultCacheMemberObj
+resultObj
 ^^^^^^^^^^^^^^^^^^^^
 
 Constructor
 ...............................................................................
 
-Instances of resultCacheMemberObj are always obtained through 
-`layerObj`_'s getResult() method.
+.. code-block:: php
 
+    new resultObj(int shapeindex)
+
+or using the `layerObj`_'s getResult() method.
+
 Members
 ...............................................................................
 
@@ -1961,6 +1966,7 @@
 int             shapeindex    (read-only)
 int             tileindex     (read-only)
 int             classindex    (read-only)
+int             resultindex   (read-only)
 =============== ====================================================================
 
 Method



More information about the mapserver-commits mailing list