Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controller protected methods [like loadObj]: calls from components denied #396

Closed
didoda opened this issue Nov 8, 2013 · 4 comments
Closed

Comments

@didoda
Copy link
Member

didoda commented Nov 8, 2013

Some useful 'protected' methods (like frontendController->loadObj) are declared in controllers, not available from components. How to use them?

A. make them 'public' in controllers, and let them be 'tokens', not available if called directly through urls.
B. create a public wrapper for these methods, then let it be a 'token', not available if called directly through urls.

Both A and B allow components to call specified methods (calls like: $this->Controller->loadObj ...).

@stefanorosanelli
Copy link
Member

From a design perpsective calling controller methods from components is not a good thing.
Maybe that logic should reside in models or elsewhere.
At this point we need to handle however situations where public methods may not be called from urls, so I would go with solution A.
@batopa what do you think?

@batopa
Copy link
Member

batopa commented Nov 12, 2013

I agree, a refactoring of FrontendController splitting methods in models or other needed, but probably we will address it in BEdita 4.

For now we can proceed with solution A.

@didoda
Copy link
Member Author

didoda commented Nov 14, 2013

Commit above for solution A. Frontend methods involved: "loadObj","loadObjByNick","loadSectionObjects","loadSectionObjectsByNick","objectRelationArray".

@qwerg qwerg closed this as completed Nov 29, 2013
@qwerg qwerg reopened this Nov 29, 2013
@stefanorosanelli
Copy link
Member

@batopa @didoda : close issue?

@didoda didoda closed this as completed Jul 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants