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

Java 8 + Maven Javadoc plugin: Error fetching URL -

android - How to delete or change the searchview icon inside the SearchView actionBar? -

c++ - Msgpack packing bools bug -