Opened 20 years ago
Closed 20 years ago
#574 closed defect (wontfix)
Unification of SWIG and PHP mapscript API
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript | Version: | 4.1 |
Severity: | normal | Keywords: | |
Cc: |
Description
Goal: Bring the SWIG and PHP mapscript APIs near enough to where it's useful to merge the documentation. Here are some differences that need to be worked out: Class Names ----------- SWIG mapscript has classes which are named after the structs in map.h like 'pointObj', etc. The PHP README contains classes like 'PointObj', 'pointObj', 'pointObject'. I don't know whether PHP is case insensitive or not, but the SWIG modules are, and we'll need to settle on unified class names. While we are at it, what about renaming the classes to remove the superfluous 'Obj' suffix and capitalize the names? In most OO languages the convention is that classes have capitalized names. Instead of mapscript.layerObj we would have mapscript.Layer which is better. (another aside: we should really rename a merged API to 'mapserver' instead of 'mapscript') Function/Method Names --------------------- I've been following the original SWIG mapscript style which is camel case. The PHP README has some camel case, some completely lower case function names. Function Arguments ------------------ I am currently refactoring many constructors to take optional arguments. You can see this with colorObj and rectObj. Is this feasible with PHP? Yes, I have assumed. Any other issues that you see?
Note:
See TracTickets
for help on using tickets.