Re: [PHP-DOC] PhD class renamings

2009-06-16 Thread Hannes Magnusson
On Tue, Jun 16, 2009 at 16:10, Philip Olson wrote:
>
> On Jun 16, 2009, at 1:34 AM, Christian Weiske wrote:
>
>> Hi Hannes,
>>
>>
> But that is the only difference?

 Yes.
>>>
>>> I don't see any explicit mention of the vendor directory must being
>>> lowercase (although all examples are lowercased)..
>>
>> That was consensus - lowercasity is to distinguish between "normal"
>> directories (i.e. class dirs) and namespace dirs - at least in the PEAR2
>> standards.
>>
>>> But ok, then I prefer to use 'phd' and make dirty autoload workaround
>>> until we move to namespaces.
>>>
>>> ..actually.
>>> That will make the namespace name 'phd\PhD\', 'phd\PhD\Reader',
>>> 'phd\PhD\Package\PEAR' ?
>>
>> No. When we use namespaces, we don't need the PhD class prefix anymore.
>> So without namespaces:
>> PhD_Package_PEAR_Web
>> with namespace:
>> phd\Package_PEAR_Web
>
> How about using namespaces now? For PhD HEAD. PHP 5.3 is the future, so
> let's get onboard. :)

Well, if someone wants to do the work.. feel free :D

-Hannes


Re: [PHP-DOC] PhD class renamings

2009-06-16 Thread Philip Olson


On Jun 16, 2009, at 1:34 AM, Christian Weiske wrote:


Hi Hannes,



But that is the only difference?

Yes.


I don't see any explicit mention of the vendor directory must being
lowercase (although all examples are lowercased)..
That was consensus - lowercasity is to distinguish between "normal"  
directories (i.e. class dirs) and namespace dirs - at least in the  
PEAR2 standards.



But ok, then I prefer to use 'phd' and make dirty autoload workaround
until we move to namespaces.

..actually.
That will make the namespace name 'phd\PhD\', 'phd\PhD\Reader',
'phd\PhD\Package\PEAR' ?
No. When we use namespaces, we don't need the PhD class prefix  
anymore.

So without namespaces:
PhD_Package_PEAR_Web
with namespace:
phd\Package_PEAR_Web


How about using namespaces now? For PhD HEAD. PHP 5.3 is the future,  
so let's get onboard. :)


Regards,
Philip


Re: [PHP-DOC] PhD class renamings

2009-06-16 Thread Christian Weiske
Hi Hannes,


> >> But that is the only difference?
> > Yes.
> 
> I don't see any explicit mention of the vendor directory must being
> lowercase (although all examples are lowercased)..
That was consensus - lowercasity is to distinguish between "normal" directories 
(i.e. class dirs) and namespace dirs - at least in the PEAR2 standards.

> But ok, then I prefer to use 'phd' and make dirty autoload workaround
> until we move to namespaces.
> 
> ..actually.
> That will make the namespace name 'phd\PhD\', 'phd\PhD\Reader',
> 'phd\PhD\Package\PEAR' ?
No. When we use namespaces, we don't need the PhD class prefix anymore.
So without namespaces:
 PhD_Package_PEAR_Web
with namespace:
 phd\Package_PEAR_Web


-- 
Regards/Mit freundlichen Grüßen
Christian Weiske


Re: [PHP-DOC] PhD class renamings

2009-06-16 Thread Hannes Magnusson
On Tue, Jun 16, 2009 at 10:09, Christian Weiske wrote:
> Hallo Hannes,
>
>
>> >> The directory structure is compatible with the intheworks namespace naming
>> >> convention cs, right?
>> >> (Meaning if we move to namespaces no change is needed)
>> > No. The new namespace convention would mean that - if we chose phd as 
>> > namespace (note, lowercase!), the directory wouldn't be PhD/ but phd/.
>>
>> can't the module root (/phd) be the first level directory?
>> /phd/phd/ and/or /phd/PhD/ is confusing and ugly :]
> No, that does not work well. Having the module directory (phd) as the first 
> level dir would require anyone to checkout as phd/, but would not work 
> anymore for checkouts in directories like phd_0_4. For the autoloader to work 
> best - and easiest - a root PhD/ is required because then you can just
>> str_replace('_', '/', $class) . '.php'
> and have the file name. If PhD/ wasn't there in cvs, it would still work as 
> described when installed - but not from cvs.
>

Fair enough

>>
>> But that is the only difference?
> Yes.

I don't see any explicit mention of the vendor directory must being
lowercase (although all examples are lowercased)..

But ok, then I prefer to use 'phd' and make dirty autoload workaround
until we move to namespaces.

..actually.
That will make the namespace name 'phd\PhD\', 'phd\PhD\Reader',
'phd\PhD\Package\PEAR' ?
That looks funny.

-Hannes


Re: [PHP-DOC] PhD class renamings

2009-06-16 Thread Christian Weiske
Hallo Hannes,


> >> The directory structure is compatible with the intheworks namespace naming
> >> convention cs, right?
> >> (Meaning if we move to namespaces no change is needed)
> > No. The new namespace convention would mean that - if we chose phd as 
> > namespace (note, lowercase!), the directory wouldn't be PhD/ but phd/.
> 
> can't the module root (/phd) be the first level directory?
> /phd/phd/ and/or /phd/PhD/ is confusing and ugly :]
No, that does not work well. Having the module directory (phd) as the first 
level dir would require anyone to checkout as phd/, but would not work anymore 
for checkouts in directories like phd_0_4. For the autoloader to work best - 
and easiest - a root PhD/ is required because then you can just
> str_replace('_', '/', $class) . '.php'
and have the file name. If PhD/ wasn't there in cvs, it would still work as 
described when installed - but not from cvs.

> 
> But that is the only difference?
Yes.

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske


Re: [PHP-DOC] PhD class renamings

2009-06-16 Thread Hannes Magnusson
On Tue, Jun 16, 2009 at 07:47, Christian Weiske wrote:
> Hi Bjori,
>
>
>> The directory structure is compatible with the intheworks namespace naming
>> convention cs, right?
>> (Meaning if we move to namespaces no change is needed)
> No. The new namespace convention would mean that - if we chose phd as 
> namespace (note, lowercase!), the directory wouldn't be PhD/ but phd/.

can't the module root (/phd) be the first level directory?
/phd/phd/ and/or /phd/PhD/ is confusing and ugly :]

But that is the only difference?


>> Shame we loose the history... but this needs to be done
> We don't - philip wants to get someone to move them on the server, preserving 
> history.

Ouh, cool.

(sorry for top-posting in the last reply, blame the gmail app on my
new awesome HTC Magic *brag*) :P

-Hannes


Re: [PHP-DOC] PhD class renamings

2009-06-15 Thread Christian Weiske
Hi Bjori,


> The directory structure is compatible with the intheworks namespace naming
> convention cs, right?
> (Meaning if we move to namespaces no change is needed)
No. The new namespace convention would mean that - if we chose phd as namespace 
(note, lowercase!), the directory wouldn't be PhD/ but phd/.

> Shame we loose the history... but this needs to be done
We don't - philip wants to get someone to move them on the server, preserving 
history.

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske


Re: [PHP-DOC] PhD class renamings

2009-06-15 Thread Hannes Magnusson
The directory structure is compatible with the intheworks namespace naming
convention cs, right?
(Meaning if we move to namespaces no change is needed)

Shame we loose the history... but this needs to be done

-Hannes

On Jun 15, 2009 7:22 p.m., "Christian Weiske"  wrote:

Hi all, especially bjori,



My proposed renamings for the classes are:
> http://tmp.cweiske.de/phd-moveclasses

Any objections?

#!/bin/sh
#copy phd classes around
#make sure you are in phd/

mkdir PhD
mkdir PhD/Format
mkdir PhD/Format/Abstract
mkdir PhD/Reader
mkdir PhD/Theme
mkdir PhD/Theme/PEAR
mkdir PhD/Theme/PHP
mkdir PhD/Package
mkdir PhD/Package/Default
mkdir PhD/data
mkdir PhD/data/langs

cp include/langs/*.xml PhD/data/langs/

cp formats/AbstractXHTMLFormat.php PhD/Format/Abstract/XHTML.php
cp formats/manpage.php PhD/Format/Manpage.php
cp formats/pdf.php PhD/Format/PDF.php
cp formats/xhtml.php PhD/Format/XHTML.php

cp include/PhDFormat.class.php PhD/Format/Legacy.php
cp include/PhDEnterpriseFormat.class.php PhD/Format.php
cp include/PhDFormatFactory.php PhD/Format/Factory.php

cp config.php PhD/Config.php

cp include/PhDBuildOptions.class.php PhD/BuildOptionsParser.php
cp include/PhDHelper.class.php PhD/Helper.php
cp include/PhDHighlighter.class.php PhD/Highlighter.php
cp include/PhDIndex.class.php PhD/Index.php
cp include/PhDMediaManager.class.php PhD/MediaManager.php
cp include/PhDRender.class.php PhD/Render.php
cp include/PhDErrors.php PhD/functions.php
cp include/PhDObjectStorage.class.php PhD/ObjectStorage.php

cp include/PhDTheme.class.php PhD/Theme.php
cp include/PhDThemeXhtml.class.php PhD/Theme/XHTML.php

cp include/PhDReader.class.php PhD/Reader/Legacy.php
cp include/PhDPartialReader.class.php PhD/Reader/Partial.php
cp include/PhDEnterpriseReader.class.php PhD/Reader.php

cp packages/Default/DefaultFactory.class.php
PhD/Package/Default/Factory.php cp packages/Default/xhtml.php
PhD/Package/Default/XHTML.php

cp themes/pear/pearbightml.php PhD/Theme/PEAR/BigHTML.php
cp themes/pear/pearchm.php PhD/Theme/PEAR/CHM.php
cp themes/pear/pearchunkedhtml.php PhD/Theme/PEAR/ChunkedHTML.php
cp themes/pear/peartheme.php PhD/Theme/PEAR/Base.php
cp themes/pear/pearweb.php PhD/Theme/PEAR/Web.php

cp themes/php/bightml.php PhD/Theme/PHP/BigHTML.php
cp themes/php/chmsource.php PhD/Theme/PHP/CHMSource.php
cp themes/php/chunkedhtml.php PhD/Theme/PHP/ChunkedHTML.php
cp themes/php/howto.php PhD/Theme/PHP/HowTo.php
cp themes/php/phpbigpdf.php PhD/Theme/PHP/BigPDF.php
cp themes/php/phpdotnet.php PhD/Theme/PHP/PHPDotNet.php
cp themes/php/phpfunctions.php PhD/Theme/PHP/Functions.php
cp themes/php/phpkdevelop.php PhD/Theme/PHP/KDevelop.php
cp themes/php/phppdf.php PhD/Theme/PHP/PDF.php
cp themes/php/phpweb.php PhD/Theme/PHP/Web.php

--
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-