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

Skip to content
Question: VoterInterface supportsClass #11686
Closed
@gondo

Description

@gondo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0