| 1 | <?php |
||
| 9 | class InstallerVoter implements VoterInterface |
||
| 10 | { |
||
| 11 | const ATTR = 'IS_INSTALLER_USER'; |
||
| 12 | |||
| 13 | /** @var \Symfony\Component\HttpFoundation\Request $request */ |
||
| 14 | private $request; |
||
| 15 | |||
| 16 | /** @var array $whitelisted Contains the list of authorized IP address */ |
||
| 17 | private $whitelisted; |
||
| 18 | |||
| 19 | public function __construct(ContainerInterface $container, $filepath) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritdoc} |
||
| 31 | */ |
||
| 32 | public function supportsAttribute($attribute) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | public function supportsClass($class) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritodc} |
||
| 47 | */ |
||
| 48 | public function vote(TokenInterface $token, $object, array $attributes) |
||
| 64 | } |
||
| 65 |