I have a class with many functions. About 80% of these functions are
rarely used, so I'd like to split them out to a separate file and
include them only if a certain condition applies. This way the PHP
compiling is kept to a minimum. How do I make the included functions
members of the current class?
Example:
myclass.php
-----------
<?php
class MyClass {
function func1() {
if($foo) {
include_once("myclass2.php");
$this->func2(); // this doesn't work, it won't find func2!
}
}
}
?>
myclass2.php
------------
<?php
// I need these functions to be
// members of MyClass... how?
function func2() {
// do something
}
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]