01-06-2009, 01:46 AM
|
#6 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
How about using like the following to achieve what you're after? All you have to do is ensure the TalkPHP_Factory is included on every single page, and then make your calls as so:
php Code:
echo TalkPHP_Factory:: getInstance()-> TalkPHP_Hello()-> getText(); echo TalkPHP_Factory:: getInstance()-> TalkPHP_Goodbye()-> getText();
This is in the style Class->Function(). Is this something like what you're after?
Obviously you'll need to modify it a touch to auto include files, but I added the functionality in the __autoload() function, just to show you how you could do it.
php Code:
function __autoload ($szClass){ $szFile = sprintf('./includes/%s.php', $szClass); if (! file_exists($szFile)) { return false; } include_once($szFile); }
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|