[dev] lib/String.php ... nag this time

Chris chris at jeks.net
Wed Jan 8 17:11:14 PST 2003


.... for these type of dependencies, in this case lib/Crypt.php requires
the lib/String library, wouldn't it be more appropriate to require_once
that library in the library that's dependant on it?

e.g. shouldn't the require_once 'lib/String.php' go right in lib/Crypt.php
instead of in a lot of different places like all the apps base.php files?

Doing this fixes nag:

cvs diff -u lib/base.php
Index: lib/base.php
===================================================================
RCS file: /repository/nag/lib/base.php,v
retrieving revision 1.46
diff -u -r1.46 base.php
--- lib/base.php        5 Jan 2003 18:34:54 -0000       1.46
+++ lib/base.php        9 Jan 2003 01:08:44 -0000
@@ -15,6 +15,7 @@
 @define('NAG_BASE', dirname(__FILE__) . '/..');

 // Registry
+require_once HORDE_BASE . '/lib/String.php';
 require_once HORDE_BASE . '/lib/Registry.php';
 $registry = &Registry::singleton();
 $registry->pushApp('nag');

-- 
~ ~ ~
Chris Hyde

"It's a small world, but I wouldn't want to have to paint it."
   - Stephen Wright

~ ~ ~


More information about the dev mailing list