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! Quote Link to comment https://forums.phpfreaks.com/topic/75936-variable-class-function-names/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.