public function processConfig(Plugin $plugin, &$log = '', $xml = false)
    {
        if (!$xml)
            $xml = $this->loadXML($plugin->Path);

        if(!$xml)
            throw new Exception('Missing plugin.xml file for plugin ['.$plugin->Slug.']');

        //process config.php
        if (!empty($xml->config)) {
            $snippet = trim(strval($xml->config));

            if ($this->ConfigService->insertSnippet($plugin, $snippet, $log))
                $log .= "Appended plugin config snippet to config file.\n\n";
        }
    }
public function processConfig(Plugin $plugin, &$log = '', $xml = false)
    {
        if (!$xml)
            $xml = $this->loadXML($plugin->Path);

        if(!$xml)
            throw new Exception('Missing plugin.xml file for plugin ['.$plugin->Slug.']');

        //process config.php
        if (!empty($xml->config)) {
            $snippet = trim(strval($xml->config));

            if ($this->ConfigService->insertSnippet($plugin, $snippet, $log))
                $log .= "Appended plugin config snippet to config file.\n\n";
        }
    }
public function processConfig ( Plugin $ plugin , & $ log = '' , $ xml = false ) { if ( ! $ xml ) $ xml = $ this -> loadXML ( $ plugin -> Path ) ; if ( ! $ xml ) throw new Exception ( 'Missing plugin.xml file for plugin [' . $ plugin -> Slug . ']' ) ; //process config.php if ( ! empty ( $ xml -> config ) ) { $ snippet = trim ( strval ( $ xml -> config ) ) ; if ( $ this -> ConfigService -> insertSnippet ( $ plugin , $ snippet , $ log ) ) $ log .= "Appended plugin config snippet to config file.\n\n" ; } }
Appends the plugin's config snippet to the config file

@param Plugin            $plugin The plugin to process
@param string            &$log   A var that holds logging details
@param SimpleXMLExtended $xml    If specified, process this XML instead of loading the plugins

@return void
Appends the plugin s config snippet to the config file