Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
ihemant

Comment-Module Extenstion Problem

Recommended Posts

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. 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...