Dynamically including methods in classes?
Posted: Wed May 17, 2006 4:31 pm
Hi
I'm just wondering, in the interests of decreasing maintenance of my data object classes would the following work to include extra methods into the class?
If not, is there a way I can accomplish this that would remain php4 compatible?
I'm just wondering, in the interests of decreasing maintenance of my data object classes would the following work to include extra methods into the class?
Code: Select all
<?php
class SomeClass{
var $classname = 'SomeClass';
// Some properties
function SomeClass(){
//Some code
}
// Some more methods
include($this->classname . '_extras.inc.php');
}
?>