[TYPO3-ect] PEAR compatible keynames

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Wed Mar 22 12:33:44 CET 2006


Peter Niederlag schrieb:
>>I would like to see camelStyledKeys instead. Do you think that would
>>cause problems with DB names and filesystem on WIN?
> 
> 
> Good question. I think there can be unsolvable problems, since
> apparently PEAR works on Windows. We just need to make sure 'camelCase'
> and 'camelcase' is interpreted as the same ext-Key by TER2.
> 
> I really like the '_' as separator, part of extension-key.
> 

The '_' represents a directory slash in the PEAR mechanisms and with
this trick it gives the information in which directory the class is
located. It is a prerequest of autoloading within a directory tree.

1.) We can first "shorten" all extension keys to camelStyle:

my_super_extension => MySuperExtension


2.) We can then use autoloading:

load('Tx_MySuperExtension_My_Deep_Directory_Tree_Class');

loads

On Linux: Tx/MySuperExtension/My/Deep/Directory/Tree/Class.php

On Win: tx/mysuperextension/my/deep/directory/tree/class.php


3.) Now we can fully make use of PEAR installer, PEAR channels, PEAR
libraries, Zend libraries, EZpublish libraries, ADOdb, Unit testing,
xajax, ... the whole world of PHP ....

Regards

Elmar







More information about the TYPO3-team-extension-coordination mailing list