WriteConfig

Writes configuration files.

This is an internal class and therefore should NOT be referenced externally. Please use the proper functionality from within your module. See FreePBX Big Module Object (BMO) for more information

$files = array(             'modules.conf' => array(                                 'foo=>bar',                                 'line=>line',                                 'line=>line2'                                 )             ); FreePBX::WriteConfig($files);    //Alternatively $config = FreePBX::WriteConfig(); $config->writeConfigs($files);

writeConfig()

/**  * Write single configuration file  *  * Simply builds an array and passes it to writeConfigs()  * @param string $filename File to write  * @param mixed $contents What should be written to the file  */ public function writeConfig($filename = null, $contents)

 

writeConfigs()

/**  * Write multiple configuration files.  * This is the public call to write configuration files.  * @param array $array An array of [filename]=>array(line, line, line), or [filename]=>string  */ public function writeConfigs($array)  

getHeader()

Return to Documentation Home I Return to Sangoma Support