Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#2773 closed defect (fixed)

Metadata Hashtable methods for php-mapscript

Reported by: geoprism Owned by: aboudreault
Priority: normal Milestone: 5.4 release
Component: MapScript-PHP Version: unspecified
Severity: normal Keywords:
Cc: dmorissette, assefa, jmckenna, woodbri

Description

Methods to expose the metadata hashtable in mapscript/swiginc/hashtable.i need to be ported to php-mapscript to provide for a $hash = $layer->{metadata} hashtableObj.

Attachments (2)

bug2773.patch (16.1 KB ) - added by aboudreault 16 years ago.
bug2773.2.patch (18.6 KB ) - added by aboudreault 16 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by dmorissette, 16 years ago

Cc: dmorissette assefa added
Owner: changed from mapserverbugs to aboudreault

Assigning to Alan.

comment:2 by jmckenna, 16 years ago

Cc: jmckenna woodbri added

by aboudreault, 16 years ago

Attachment: bug2773.patch added

comment:3 by aboudreault, 16 years ago

Here's is a patch. I created a hashtable object for PHP/Mapscript. The hashtable object has the following methods: get, set, remove, clear, nextkey... like the swig interface. The layer object has now a new member named "metadata" which is to the metadata hashTableObj. Example of use:

$ht = $layer->metadata;
$key = null;
while ($key = $ht->nextKey($key))
    echo "Key: ".$key."<br/>"

I merged the content of mapscript/php3/hashtable_i.c in mapscript_i.c. I can unmerge and simply add the hashtable_i.c file in Makefile.in if there is some reason to keep this file.

Also, should we add a hashtable object member to all objects that own a hashTableObj ? (Map, Class ...)

comment:4 by aboudreault, 16 years ago

I'll add the hashtable object member to all others appropriate objects later today an attach the new patch.

by aboudreault, 16 years ago

Attachment: bug2773.2.patch added

comment:5 by aboudreault, 16 years ago

Oups, forgot to check the "Replace" box when committing the new patch.

I added documentation in the README and added a "metadata" member to WebObj and ClassObj.

comment:6 by geoprism, 16 years ago

Thanks for the lightening speed patches Adrian, and for the docs as well! I barely had time to blink!!

Jeff

comment:7 by dmorissette, 15 years ago

The patch looks good Alan. Please commit to SVN.

comment:8 by aboudreault, 15 years ago

Resolution: fixed
Status: newclosed

Commited to SVN trunk in r8266

comment:9 by aboudreault, 15 years ago

The documentation has been updated in r8267

Note: See TracTickets for help on using tickets.