Changeset 250

Show
Ignore:
Timestamp:
10/17/07 01:10:36 (1 year ago)
Author:
hans
Message:

#150 - Adding patch from Dirk Thomas to fix config dir for phpunit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.3/classes/phing/tasks/ext/phpdoc/PhingPhpDocumentorSetup.php

    r158 r250  
    3737         * Constructs a new PhingPhpDocumentorSetup. 
    3838         * 
     39         * @param string $configDir Directory in which to look for configuration files. 
    3940         */ 
    40         public function __construct() { 
     41        public function __construct($configdir = null) { 
    4142                global $_phpDocumentor_cvsphpfile_exts, $_phpDocumentor_setting; 
    4243                 
     
    4445                $this->render = new phpDocumentor_IntermediateParser("Default Title"); 
    4546                 
     47                $GLOBALS['_phpDocumentor_install_dir'] = $configdir; 
    4648        $this->parseIni(); 
    4749                 
  • branches/2.3/classes/phing/tasks/ext/phpdoc/PhpDocumentorTask.php

    r199 r250  
    110110         
    111111        /** 
     112         * @var PhingFile Directory in which to look for configuration files. 
     113         */ 
     114        private $configDir; 
     115         
     116        /** 
    112117         * @var boolean Whether to parse as a PEAR repository. 
    113118         */ 
     
    200205        public function setExamplesdir(PhingFile $d) { 
    201206                $this->examplesDir = $d; 
     207        } 
     208         
     209        /** 
     210         * Set a directory to search for configuration files in. 
     211         * @param PhingFile $d 
     212         */ 
     213        public function setConfigdir(PhingFile $d) { 
     214                $this->configDir = $d; 
    202215        } 
    203216         
     
    286299        { 
    287300                $this->validate(); 
    288                 $phpdoc = new PhingPhpDocumentorSetup(); 
     301                $configdir = $this->configDir ? $this->configDir->getAbsolutePath() : null; 
     302                $phpdoc = new PhingPhpDocumentorSetup($configdir); 
    289303                $this->setPhpDocumentorOptions($phpdoc); 
    290304                //$phpdoc->readCommandLineSettings();