Re: [Coding Standards] Loading all files at once

From: Date: Mon, 09 Jul 2007 21:44:59 +0000
Subject: Re: [Coding Standards] Loading all files at once
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47312@lists.php.net to get a copy of this message
Philippe Jausions wrote:
I also find include_path quite useful. How to address lazy-loaded user self-patched PEAR packages, if not with include_path? (note the dirname(__FILE__)) Also, how would package inter-dependency be handled with allfiles.php file(s)? -Philippe
I find include_path useful too, but having to set is also a very common complaint about pear. Anyhow if you use constants as part of the allfiles.php you can create a setup where you can still use include paths as needed. Something like: |if (!defined('PEAR2_PATH')) { define('PEAR2_PATH', dirname(__FILE__).'/'); } require PEAR2_PATH . 'HTTP/Request.php'; Then if you want to use include path you just set PEAR2_PATH to an empty string. With the current setup its hard to do any sort of custom include scheme you have to edit every file. With allfiles.php the includes are outside of the code so its very easy to do custom schemes, you just make a file that does what you need. Its also worth noting that outside of driver based packages the majority of the code is used no matter what you do. Inter-dependency could be handled by one allfiles.php including another one -josh |

« previous php.pear.dev (#47312) next »