[mapserver-commits] r8486 - trunk/docs/mapscript/php

svn at osgeo.org svn at osgeo.org
Mon Feb 2 12:08:10 EST 2009


Author: assefa
Date: 2009-02-02 12:08:10 -0500 (Mon, 02 Feb 2009)
New Revision: 8486

Modified:
   trunk/docs/mapscript/php/index.txt
Log:
Add examples for updateFromString functions

Modified: trunk/docs/mapscript/php/index.txt
===================================================================
--- trunk/docs/mapscript/php/index.txt	2009-02-02 15:33:43 UTC (rev 8485)
+++ trunk/docs/mapscript/php/index.txt	2009-02-02 17:08:10 UTC (rev 8486)
@@ -710,6 +710,11 @@
 int updateFromString(string snippet)
     Update a layer from a string snippet. Returns MS_SUCCESS/MS_FAILURE.
 
+.. code-block:: php
+
+    $oLayer->updateFromString('LAYER NAME land_fn2 END'); /*modify the name */
+    $oLayer->updateFromString('LAYER CLASS STYLE COLOR  255 255 0  END END END'); /*add a new class*/       
+
 int set(string property_name, new_value)
     Set object property to a new value. Returns -1 on error.
 
@@ -1013,6 +1018,10 @@
 int updateFromString(string snippet)
     Update a class from a string snippet. Returns MS_SUCCESS/MS_FAILURE.
 
+.. code-block:: php
+
+    $oClass->updateFromString('CLASS STYLE COLOR 255 0 255 END END'); /*set the color */
+
 int set(string property_name, new_value)
     Set object property to a new value. Returns -1 on error.
 
@@ -2383,3 +2392,4 @@
 string  nextkey(string previousKey)
     Return the next key or first key if previousKey = NULL.
     Return NULL if no item is in the hashTable or end of hashTable is reached
+



More information about the mapserver-commits mailing list