I Want to read a pareameter from parameters.yml. the solution is to extend the Controller but I got this error :
Error: Call to a member function getParameter() on null
I know that the container is null, but i don't know how to get the container?
class Configuration extends Controller
{
public function __construct()
{
$this->tempFolderPath = sys_get_temp_dir();
$parameter = $this->container->getParameter('a');
}
}
Any solution ? Any help ?