[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [phpGroupWare-developers] datetime class and PHP 5.2
From: |
Dave Hall |
Subject: |
Re: [phpGroupWare-developers] datetime class and PHP 5.2 |
Date: |
Wed, 27 Dec 2006 11:34:45 +1100 |
On Tue, 2006-12-26 at 14:37 +0100, Sigurd Nes wrote:
> Dave Hall wrote:
> > Hi all,
> >
> > I have prepared a patch which fixes the problems with the datetime class
> > in PHP 5.2 conflicting with our datetime class.
> >
<snip />
>
>
> Some weeks ago I renamed class.datetime.inc.php to
> class.datetimefunctions.inc.php and updated the call to it wherever I
> could find it (in HEAD)
I was aware of that. I didn't like the name. As it is a class I don't
think it should have functions in the class name. Also as it is
phpGroupWare specific, I thought we should prepend phpgw to the class
name. This is partially based on the suggestions here -
http://paul-m-jones.com/organizing-php-projects.pdf (yes it is slides
from a talk), look at pages 10 and 11. 12 would be nice but more
work :)
I also think we need to look at prefixing all of our classes in HEAD to
avoid such issues in the future. I see that we have 2 options.
Prefix by app:
app/inc/class.blah.inc.php contains a class called "app_blah" which
createObject will "auto prepend" the app_ to the class name before
instantiating it. I prefer this option as it will also prevent class
name clashes within phpGW.
Prefix with phpgw
app/inc/class.blah.inc.php contains a class called "phpgw_blah" which
createObject will "auto prepend" the phpgw_ to the class name before
instantiating it.
I know this has the potential to create some work and introduce some
extra bugs to be fixed :( I am happy to help with implementing this.
Cheers
Dave
--
Dave Hall (aka skwashd)
API Coordinator
phpGroupWare
e address@hidden
w phpgroupware.org
j address@hidden
sip address@hidden
_ ____ __ __
_ __ | |__ _ __ / ___|_ __ ___ _ _ _ _\ \ / /_ _ _ __ ___
| '_ \| '_ \| '_ \| | _| '__/ _ \| | | | '_ \ \ /\ / / _` | '__/ _ \
| |_) | | | | |_) | |_| | | | (_) | |_| | |_) \ V V / (_| | | | __/
| .__/|_| |_| .__/ \____|_| \___/ \__,_| .__/ \_/\_/ \__,_|_| \___|
|_| |_| |_|Web based collaboration platform