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

Changing the getRedirect function to protected as I need to extend the c... #498

Merged
merged 1 commit into from
Aug 8, 2014

Conversation

shipleyr
Copy link
Contributor

@shipleyr shipleyr commented Jul 9, 2014

...lass at this point.

Use Case: I have a guest login system which uses a separate route to login (zfcuser/guest) and the redirect plug-in is looking explicitly for zfcuser/login to do a redirect. I want to extend the RedirectCallback class with my own which does a check for the login/guest route, set the $currentRoute variable to zfcuser/login then call the parent function. No code duplication. At the moment it requires the entire class to be coppied/pasted to achieve the same functionality.

…e class at this point.

Use Case: I have a guest login system which uses a separate route to login (zfcuser/guest) and the redirect plug-in is looking explicitly for zfcuser/login to do a redirect. I want to extend the RedirectCallback class with my own which does a check for the login/guest route, set the $currentRoute variable to zfcuser/login then call the parent function. No code duplication. At the moment it requires the entire class to be coppied/pasted to achieve the same functionality.
@Danielss89 Danielss89 modified the milestones: 2.0.0, 1.2.2 Jul 20, 2014
@Danielss89
Copy link
Member

I am wondering if we should change the other methods/vars to protected.
Maybe @Ocramius can chime in on why he advised it to be private?

@ojhaujjwal
Copy link
Contributor

No disrespect to @Ocramius

But, you should probably ask the reason when Marco advises you to do/change something.

Danielss89 added a commit that referenced this pull request Aug 8, 2014
Changing the getRedirect function to protected as I need to extend the c...
@Danielss89 Danielss89 merged commit 19d8fe1 into ZF-Commons:1.x Aug 8, 2014
@shipleyr shipleyr deleted the bugfix/method-visibility branch September 24, 2014 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants