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

Implement static parameters in Handler methods #70

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sergeylukin
Copy link

Introducing new feature. Shouldn't break any existing functionality.
Inspired by what can be done with mod_rewrite:

RewriteRule ^something$  index.php?page_ID=15

@sergeylukin
Copy link
Author

After playing with it I got to conclusion that it'd be more flexible to provide one array with all the parameters in key-value format instead of adding them one by one as separate key-less arguments as it may be necessary to fetch parameters by their key name to make sure that desired parameter is fetched and not anything else. An example could be a Base Handler Class that adds some generic Hook in the __constructor and it cannot guarantee that every Handler that extends it has a static parameter passed in it's route. In that case, verification functionality may be required to verify that specific static parameter has been passed before adding the Hook.

I'll submit a commit with the changes described above soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant