php - Symfony2 get root directory path from command class -
what way root directory path command class in symfony 2 ? note : not controller class creating cli command.
or there a way define path in config file , access in anywhere ?
by extending containerawarecommand can access root directory path using:
$this->getcontainer()->get('kernel')->getrootdir()
Comments
Post a Comment