[Phpwm] Directory Strucutures

Rob Allen rob at akrabat.com
Sat Sep 16 08:38:36 BST 2006


Phil Beynon wrote:
> 
> Well reading that makes me feel incredibly guilty and disorganised - my
> directory structures just kind of evolve on the fly depending where the mood
> takes. :-)
> 


*grin*


Mine did too until I started working with others, and then it became
useful to be able to predict where to find stuff :)  The other advantage
is that you can start getting the "system" to load the right files up
for you based on their names.

e.g. PHP5's autoload functionality means that you only load class files
when you actually instantiate a class. However the autoload needs to be
able to find the file.

Thus if you use underscores in class names represent directory breaks,
you can do:
	$controller = new AkCom_Controller_Action()

and the autoload will know to include the file AkCom/Controller/Action.php.


Regards,

Rob...



More information about the Phpwm mailing list