devilinc Posted June 7, 2010 Share Posted June 7, 2010 here is my situation in detail... i retrieve a "value" from database...and call a function named $this->value('some id again from database'); the "value" here is the name of the function i wish to call....i manually entered those function names into the db and if a condition is satisfied tht function gets called..... an example of value could be _getProcessedPlyr or _getReadPlyr or _getWritePlyr.......is it possible or not? as the value changes the function called should be different.... if anyone has some better suggestion to implement this please feel free to comment.... Quote Link to comment https://forums.phpfreaks.com/topic/204091-is-it-possible-to-call-a-function-dynamically-in-cakephp/ Share on other sites More sharing options...
ignace Posted June 7, 2010 Share Posted June 7, 2010 if anyone has some better suggestion to implement this please feel free to comment.... What are you trying to do? Why should your db contain class functions? Quote Link to comment https://forums.phpfreaks.com/topic/204091-is-it-possible-to-call-a-function-dynamically-in-cakephp/#findComment-1068979 Share on other sites More sharing options...
devilinc Posted June 7, 2010 Author Share Posted June 7, 2010 well, my db has class functions names cos i need to use those corresponding functions, only if certain condition is met....again this condition is stored ion the db too....condition means like if it is a do this function and if b do this other function.... hope you got a clearer picture now...so i would like to process this in a beter way..... Quote Link to comment https://forums.phpfreaks.com/topic/204091-is-it-possible-to-call-a-function-dynamically-in-cakephp/#findComment-1068984 Share on other sites More sharing options...
devilinc Posted June 10, 2010 Author Share Posted June 10, 2010 I had got the concept wrong.....actually, i missed some xcel files which had a description of certain things i needed for switch/case...hav it working guys... Quote Link to comment https://forums.phpfreaks.com/topic/204091-is-it-possible-to-call-a-function-dynamically-in-cakephp/#findComment-1070270 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.