classes/phing/util/PearPackageScanner.php
public function setConfig($config)
    {
        if ($config != '') {
            if (!file_exists($config)) {
                throw new BuildException(
                    'PEAR configuration file "' . $config . '" does not exist'
                );
            }
        } else {
            // try to auto-detect a pear local installation
            if (DIRECTORY_SEPARATOR == '/') {
                $config = '.pearrc';
            } else {
                $config = 'pear.ini';
            }
            $config = PEAR_CONFIG_DEFAULT_BIN_DIR . DIRECTORY_SEPARATOR . $config;
            if (!file_exists($config)) {
                // cannot find a pear local installation
                $config = '';
            }
        }

        $this->config = $config;
    }
public function setConfig($config)
    {
        if ($config != '') {
            if (!file_exists($config)) {
                throw new BuildException(
                    'PEAR configuration file "' . $config . '" does not exist'
                );
            }
        } else {
            // try to auto-detect a pear local installation
            if (DIRECTORY_SEPARATOR == '/') {
                $config = '.pearrc';
            } else {
                $config = 'pear.ini';
            }
            $config = PEAR_CONFIG_DEFAULT_BIN_DIR . DIRECTORY_SEPARATOR . $config;
            if (!file_exists($config)) {
                // cannot find a pear local installation
                $config = '';
            }
        }

        $this->config = $config;
    }
public function setConfig ( $ config ) { if ( $ config != '' ) { if ( ! file_exists ( $ config ) ) { throw new BuildException ( 'PEAR configuration file "' . $ config . '" does not exist' ) ; } } else { // try to auto-detect a pear local installation if ( DIRECTORY_SEPARATOR == '/' ) { $ config = '.pearrc' ; } else { $ config = 'pear.ini' ; } $ config = PEAR_CONFIG_DEFAULT_BIN_DIR . DIRECTORY_SEPARATOR . $ config ; if ( ! file_exists ( $ config ) ) { // cannot find a pear local installation $ config = '' ; } } $ this -> config = $ config ; }
Sets the full path to the PEAR configuration file

@param string $config Configuration file

@throws BuildException
@return void
Sets the full path to the PEAR configuration file