[mapserver-dev] PHP 7 MapScript SWIG Support / Discussion
Jeff McKenna
jmckenna at gatewaygeomatics.com
Tue Jan 3 07:45:20 PST 2017
Update: SWIG-3.0.11 was released recently on 29 December containing the
full PHP 7 support.
-jeff
On 2016-12-20 5:58 PM, Jeff McKenna wrote:
> Regarding the clone() keyword, I looked closer at the MapServer source,
> and in fact Java MapScript faced the same issue apparently, and handled
> that by defining a new function name for those use cases (cloning map,
> layer, class, style, shape instances) such as:
>
> #ifdef SWIGJAVA
> %newobject cloneMap;
> mapObj *cloneMap()
> #else
> %newobject clone;
> mapObj *clone()
> #endif
>
> So we would do the same for SWIGPHP (reference them in the /swiginc/
> files and define those functions in /mapscript/php/phpextend.i
>
> (I've updated the RFC with those notes)
>
> Thanks for the feedback Ducky!
>
> -jeff
>
>
>
>
> On 2016-12-19 10:49 AM, Dan Little wrote:
>> I'm generally positive about this in the hopes that it means the
>> PHP/MapScript+SWIG will ensure PHP gets feature parity with the other
>> versions of MapScript. I also am a fan of what looks to be a more
>> consistent syntax to modern PHP.
>>
>> I'll venture an opinion/suggestions on the reserved word cases
>> (specifically clone and close): Is there a way to alias those
>> function names to something other than "c_..." ? If so, I've seen
>> some convention such as "clone_" or "close_", and more PHP-y might be
>> something to the tune of "cloneInstance()" or "closeXYZ" where XYZ is
>> actual context appropriate (closeStream, closeConnection, etc.).
>>
>> Cheers.
>>
>> On Mon, Dec 19, 2016 at 9:47 AM, Dan Little <theduckylittle at gmail.com>
>> wrote:
>>> I'm generally positive about this in the hopes that it means the
>>> PHP/MapScript+SWIG will ensure PHP gets feature parity with the other
>>> versions of MapScript. I also am a fan of what looks to be a more
>>> consistent syntax to modern PHP.
>>>
>>> I'll venture an opinion/suggestions on the reserved word cases
>>> (specifically clone and close): Is there a way to alias those
>>> function names to something other than "c_..." ? If so, I've seen
>>> some convention such as "clone_" or "close_", and more PHP-y might be
>>> something to the tune of "cloneInstance()" or "closeXYZ" where XYZ is
>>> actual context appropriate (closeStream, closeConnection, etc.).
>>>
>>> Cheers.
>>>
>>> On Fri, Dec 16, 2016 at 4:32 PM, Jeff McKenna
>>> <jmckenna at gatewaygeomatics.com> wrote:
>>>> Hi all,
>>>>
>>>> I've created an RFC draft for the PHP 7 SWIG potential changes:
>>>> http://mapserver.org/development/rfc/ms-rfc-117.html
>>>>
>>>> Please pay attention to the "Limitations" section, as there are some
>>>> items
>>>> that need discussion. I will plan to discuss this for sure at the
>>>> next PSC
>>>> meeting on 19 January, so we have lots of time to discuss,
>>>> especially as we
>>>> are entering the holidays.
>>>>
>>>> Wishing the whole MapServer community a truly happy and merry
>>>> Christmas! :)
>>>>
>>>> -jeff
>>>>
>>>>
>
More information about the mapserver-dev
mailing list