Authorization/Voter/ExpressionVoter.php
protected function getVariables(TokenInterface $token, $subject)
    {
        $event = new GetExpressionVariablesEvent($token);
        $this->dispatcher->dispatch(ExpressionVariableEvents::GET, $event);

        $variables = array_merge($event->getVariables(), [
            'object' => $subject,
            'subject' => $subject,
        ]);

        if ($subject instanceof Request) {
            $variables['request'] = $subject;
        }

        return $variables;
    }
protected function getVariables(TokenInterface $token, $subject)
    {
        $event = new GetExpressionVariablesEvent($token);
        $this->dispatcher->dispatch(ExpressionVariableEvents::GET, $event);

        $variables = array_merge($event->getVariables(), [
            'object' => $subject,
            'subject' => $subject,
        ]);

        if ($subject instanceof Request) {
            $variables['request'] = $subject;
        }

        return $variables;
    }
protected function getVariables ( TokenInterface $ token , $ subject ) { $ event = new GetExpressionVariablesEvent ( $ token ) ; $ this -> dispatcher -> dispatch ( ExpressionVariableEvents :: GET , $ event ) ; $ variables = array_merge ( $ event -> getVariables ( ) , [ 'object' => $ subject , 'subject' => $ subject , ] ) ; if ( $ subject instanceof Request ) { $ variables [ 'request' ] = $ subject ; } return $ variables ; }
Get the variables.

@param TokenInterface $token   The token
@param mixed          $subject The subject to secure

@return array
Get the variables .