[sync] First shot at php conversion.
Anthony Mills
amills at gascard.net
Sat Nov 8 13:06:46 PST 2003
I'll take a look at the coding standard and make some changes. I'm not
too sure about the classes in PHP. I need to read more about them.
I'll change the MBUInt32s to use arrays. The problem with them is that
the array vary in size from one to 4 bytes.
BTW Is there a good book or source on how to use classes in PHP? I've
been using OOP for years, but I don't see how to do things like static
functions and overloading. I make heavy use of it in later code.
Thanks,
Anthony
Chuck Hagenbuch wrote:
>Quoting Anthony Mills <amills at gascard.net>:
>
>
>
>>Here is the utilities file I use with WBXML. How should I post these
>>files? I have not tested this yet, I wanted to make sure I am doing
>>this correctly. Feel free to make comments.
>>
>>
>
>Especially at this stage, there is a lot less onus on the "right way" than you
>seem to be perceiving. :) We need working code - we'll sort things out and
>clean it up as we go.
>
>But, since you asked, here are a few thoughts:
>
>- take a read through horde/docs/CODING_STANDARDS for general style stuff.
>
>- send files as text/plain attachments if possible - prevents email clients from
>wrapping the lines.
>
>- it'd be nice to have these functions wrapped up in a class, even a static
>class.
>
>- in WBXML_getCharsetInt(), it'd help readability to have constants defined for
>the various character sets. Same for in _getDPIInt(), getCharsetString(), and
>getDPIString().
>
>- intToMBUInt32() should return the relevant data, instead of always writing to
>a file - just a bit more flexible that way.
>
>- no need to prefix the BitSet classname, I don't think. If there's a need to
>make sure it doesn't overlap with something else, WBXML_BitSet would be better.
>
>
>So, there you go. But, really, code is great. I can help sort this out once we
>organize things in CVS. So don't worry too much about it. :)
>
>-chuck
>
>--
>Charles Hagenbuch, <chuck at horde.org>
>"I am not that interested in green food." - Average Joe
>
>
>
More information about the sync
mailing list