I am developing an application in Symfony 3 and I would like to know what is the best way to create a Helper that can obtain defined parameters. Let me explain:
I have a file of parameters with some keys of an Api defined:
parameters:
api.public.key: '123456789'
api.private.key: 'ABCDEFGHI'
api.timestamp: '1'
Now, I want to make a Helper defined here Utils/ApiHelper.php
that can read those parameters for using a function to generate a hash.
I have defined the helper as a service but I do not know how to send the parameters to it.
services:
api.helper:
class: AppBundle\Utils\ApiHelper
public: true