从php文件访问“security.yml”

I'm new to PHP and symfony and I would like to know if it is possible to check if some PHP variables match the ones set in access_control in the security.yml. More precissely, I would like to confirm if some parameters inserted in a form match this information in real time by using ajax, which would include a php file where this comprobation would be done. Therefore, I need to access de acces_control data from my PHP file. I would like to know if this is posible and, if so, how it should be done. Thanks for your attention.