8000 Question: VoterInterface supportsClass · Issue #11686 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Question: VoterInterface supportsClass #11686

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

Closed
gondo opened this issue Aug 16, 2014 · 2 comments
Closed

Question: VoterInterface supportsClass #11686

gondo opened this issue Aug 16, 2014 · 2 comments

Comments

@gondo
Copy link
Contributor
gondo commented Aug 16, 2014

is there a reason why supportsClass function of VoterInterface expects class to be string and not object?
i saw the recommended usage f.e. here http://symfony.com/doc/current/cookbook/security/voters_data_permission.html
and i don't understand why should i use harcoded string in class comparison, rather then doing: return $class instanceof Post

@sstok
Copy link
Contributor
sstok commented Aug 17, 2014

You don't actually have to use this method.
#11183 (comment)

@gondo
Copy link
Contributor Author
gondo commented Aug 17, 2014

i see, thanks for the pointer :)

@gondo gondo closed this as completed Aug 17, 2014
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

No branches or pull requests

2 participants
0