ihemant Posted September 2, 2014 Share Posted September 2, 2014 Hi larry, Sorry for posting an off topic here, I thought this question is good to post here in this sections. I am making APIs and I have created a separated APIController for it. In order to make all the services centralized , I have linked the services with their functionality developed for desktop website (I am triggering the methords in controllers to make the whole functionality centralized). Now my problem is I have to access functions in CommentModule Extension (CommentController in Comment-Module extenstion). Which is getting on my nerve. Can anyone tell me how can I access it and call its methods from my APIController? I am not a good expert on yii yet.Plz support your answers with proper code. Thanks. Link to comment Share on other sites More sharing options...
Antonio Conte Posted September 5, 2014 Share Posted September 5, 2014 Make you CommentController a Service. That's the way to handle things like this. Inject that service into the controllers you need to use them as a dependency. This is way to much job to expect people to hand you a finished solution. Link to comment Share on other sites More sharing options...
Recommended Posts