flaab Posted November 3, 2007 Share Posted November 3, 2007 Hi =) I have a class that may have a lot of relationships and I would like to do something like this... public function getRelated<classname>(){ // Whatever logic } But I want <classname> to be variable...for example getRelatedBooks getRelatedArticles, each class has his own relationships. Can that be done? Thx! Link to comment https://forums.phpfreaks.com/topic/75936-variable-class-function-names/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.