How to get path to file under vendor in Symfony 2 -


i want parse ini file placed under vendor directory.

how can path file?

for example:

in src/acme/testbundle/repository/userrepository.php have

$file = parse_ini_file(file_path); 

how set file_path reach vendor/test/lib/conf.ini?

the other solution correct can shorter (plus should way go in current symfony version):

public function setup() {     $rootdir = $this->container->getparameter('kernel.root_dir');     $filepath = $rootdir.'/../vendor/test/lib/conf.ini';     $file = parse_ini_file($filepath);     ... } 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -