protected function configureVariables(array $files)
    {
        foreach ($files as $file => $values) {
            $file = "{$this->path}/{$file}";
            if (! file_exists($file)) {
                throw new \Exception("TRIPALTEST: Unable to configure variables. $file does not exist!");
            }

            $content = file_get_contents($file);
            foreach ($values as $search => $replace) {
                $content = str_replace($search, $replace, $content);
            }

            file_put_contents($file, $content);
        }
    }
protected function configureVariables(array $files)
    {
        foreach ($files as $file => $values) {
            $file = "{$this->path}/{$file}";
            if (! file_exists($file)) {
                throw new \Exception("TRIPALTEST: Unable to configure variables. $file does not exist!");
            }

            $content = file_get_contents($file);
            foreach ($values as $search => $replace) {
                $content = str_replace($search, $replace, $content);
            }

            file_put_contents($file, $content);
        }
    }
protected function configureVariables ( array $ files ) { foreach ( $ files as $ file => $ values ) { $ file = "{$this->path}/{$file}" ; if ( ! file_exists ( $ file ) ) { throw new \ Exception ( "TRIPALTEST: Unable to configure variables. $file does not exist!" ) ; } $ content = file_get_contents ( $ file ) ; foreach ( $ values as $ search => $ replace ) { $ content = str_replace ( $ search , $ replace , $ content ) ; } file_put_contents ( $ file , $ content ) ; } }
Finds a replaces variables in given files.

@param array $files List of files and values in the following structure:
['FILE_NAME' => [
"VARIABLE" => "NEW_VALUE"
]
]
@throws \Exception
Finds a replaces variables in given files .