On Mon, Nov 22, 2010 at 16:31, Nathan Nobbe <[email protected]> wrote:
>
> Shrug, if you want to really be dirty about it, you could just put a 'class'
> atop each file of functions.
> <?php
> class IWishTheseFunctionsWereOOInstead {} // :P
> function firstProceeduralFunc() {
> // ..
> }
> ?>
That's not going to be economical or allow him to autoload,
though, because the autoloader is called when the class is
instantiated. Prune could instantiate it thusly:
<?php
$foo = new IWishTheseFunctionsWereOOInstead();
firstProceeduralFunc(); // [sic]
?>
.... but it would be just as simple to do:
<?php
require dirname(__FILE__).'/includes/function.php';
firstProceeduralFunc(); // [sic, again]
?>
--
</Daniel P. Brown>
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php