Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

WriteConfig

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 the static header, as a function.
 * @return string Header
 */
public function getHeader() 
  • No labels