1 Jun 2004 01:57
Re[2]: New package proposal
Dmitry Koteroff <delete <at> koteroff.ru>
2004-05-31 23:57:35 GMT
2004-05-31 23:57:35 GMT
>> > Purpose of my package is NOT beautifying PHP code. It is used on
>> > run-time, not while developing.
>> Anyway, shouldn't people be writing good code to begin with and not need
>> auto-correction on the fly? Come on, how hard is it to use the proper
>> class/file name?
CG> For Windows users who don't think about case and end up distributing their
CG> source to *NIX, this could be helpfull.
CG> However, I doubt that if said Windows user knew about this package, he'd
CG> know enough to use correct caps, hopefully.
You are talking about:
require_once "a.php";
require_once "A.php";
// included twice on Windows!
Yes. But the goal of this package is not to correct windows
names.
CG> The on-demand/ auto-loading features however do sound interresting,
CG> especially if the class'd do more then a simple _ to / translation and
CG> globbing the inc-path for that file.
Of course it does. In __autoload() method lovercase classname is
passed! My library searches for corresponding filename (in any
case) in the include_file directories ("_" is translated to "/")
and returns needed file name.
http://pear.php.net/pepr/pepr-proposal-show.php?id=82
http://php.dklab.ru/PEAR/NameScheme.php
function name2path($classname, $absolutize=false) {
(Continue reading)
RSS Feed