Personal tools
You are here: Home Documentation References PHP/Mapscript Class Reference Functions

3. Functions

Document Actions
Up one level
List of functions available.
  • Constant names and class member variable names are case-sensitive in PHP.
  • Several MapScript functions (all those that access files in the back end such as ms_newMapObj(), drawMap(), etc.) will affect the value of the current working directory (CWD) in the PHP environment. This will be fixed eventually but in the meantime you should be careful about these side-effects.

The following MapServer functions are available:

string ms_GetVersion()
     Returns the MapServer version and options in a string.  This string
     can be parsed to find out which modules were compiled in, etc.

array ms_TokenizeMap(string map_file_name)
     Preparses a mapfile through the MapServer parser and return an 
     array with one item for each token from the mapfile.  Strings, 
     logical expressions, regex expressions and comments are returned
     as individual tokens.

The following ms_ioxxx functioins are related to the support of wxs service.
For more information see http://mapserver.gis.umn.edu/docs/howto/wxs_mapscript/view

void ms_ioinstallstdouttobuffer()
    Installs a mapserver IO handler directing future stdout output 
    to a memory buffer.

void ms_ioinstallstdinfrombuffer()
   Installs a mapserver IO handler directing future stdin reading 
   (ie. post request capture) to come from a buffer.

void ms_iogetstdoutbufferstring()
   Fetch the current stdout buffer contents as a string.  This method 
   does not clear the buffer.

int ms_iogetStdoutBufferBytes() 
    Writes the current buffer to stdout.  The PHP header() function should be 
    used to set the documents's content-type prior to calling the function.
    Returns the number of bytes written if output is sent to stdout.

void ms_ioresethandlers()   
  Resets the default stdin and stdout handlers in place of "buffer" based
  handlers.

void ms_iostripstdoutbuffercontenttype()
  Strip the Content-type header off the stdout buffer if it has one, and
  if a content type is found it is return. Otherwise return false.
by Jeff McKenna last modified 2006-08-31 11:36

Powered by Plone