Changeset 377

Show
Ignore:
Timestamp:
06/27/08 16:02:16 (2 months ago)
Author:
mrook
Message:

#251 - remove debug statement

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.3/classes/phing/types/Path.php

    r359 r377  
    1717 * This software consists of voluntary contributions made by many individuals 
    1818 * and is licensed under the LGPL. For more information please see 
    19  * <http://phing.info>.  
     19 * <http://phing.info>. 
    2020 */ 
    2121 
     
    3838 * to provide a way for this class to add paths to the include path, if desired -- or to create 
    3939 * an IncludePath subclass.  Once added, though, when would a path be removed from the include path? 
    40  *  
     40 * 
    4141 * <p> 
    4242 * <code> 
     
    6666class Path extends DataType { 
    6767 
    68     private $elements = array();     
    69      
     68    private $elements = array(); 
     69 
    7070    /** 
    7171     * Constructor for internally instantiated objects sets project. 
     
    7979        if ($path !== null) { 
    8080            $this->createPathElement()->setPath($path); 
    81         }         
     81        } 
    8282    } 
    8383 
     
    9191        if ($this->isReference()) { 
    9292            throw $this->tooManyAttributes(); 
    93         }         
     93        } 
    9494        $this->createPathElement()->setDir($location); 
    9595    } 
     
    124124    /** 
    125125     * Creates the nested <code>&lt;pathelement&gt;</code> element. 
    126      * @throws BuildException  
     126     * @throws BuildException 
    127127     */ 
    128128    public function createPathElement() { 
     
    137137    /** 
    138138     * Adds a nested <code>&lt;fileset&gt;</code> element. 
    139      * @throws BuildException  
     139     * @throws BuildException 
    140140     */ 
    141141    public function addFileset(FileSet $fs) { 
     
    149149    /** 
    150150     * Adds a nested <code>&lt;dirset&gt;</code> element. 
    151      * @throws BuildException  
     151     * @throws BuildException 
    152152     */ 
    153153    public function addDirset(DirSet $dset) { 
     
    207207                $this->setDir($f); 
    208208            } else { 
    209                 $this->log("dropping " . $f->__toString() . " from path as it doesn't exist",  
     209                $this->log("dropping " . $f->__toString() . " from path as it doesn't exist", 
    210210                    Project::MSG_VERBOSE); 
    211211            } 
     
    236236                } 
    237237            } 
    238              
     238 
    239239            if (is_string($o)) { 
    240240                $result[] = $o; 
     
    242242                $parts = $o->getParts(); 
    243243                if ($parts === null) { 
    244                     throw new BuildException("You must either set location or"  
     244                    throw new BuildException("You must either set location or" 
    245245                        . " path on <pathelement>"); 
    246246                } 
     
    266266                    $result[] = $d->getAbsolutePath(); 
    267267                } 
    268                 var_dump($result); 
    269268            } elseif ($o instanceof FileList) { 
    270269                $fl = $o; 
     
    277276            } 
    278277        } 
    279          
     278 
    280279        return array_unique($result); 
    281280    } 
     
    288287     */ 
    289288    public function __toString() { 
    290          
     289 
    291290        $list = $this->listPaths(); 
    292291 
     
    295294            return ""; 
    296295        } 
    297          
     296 
    298297        return implode(PATH_SEPARATOR, $list); 
    299298    } 
     
    325324            } 
    326325        } 
    327          
     326 
    328327        return $result; 
    329328    } 
     
    331330    /** 
    332331     * Returns its argument with all file separator characters 
    333      * replaced so that they match the local OS conventions.   
     332     * replaced so that they match the local OS conventions. 
    334333     */ 
    335334    public static function translateFile($source) { 
     
    342341            self::translateFileSep($result, $i); 
    343342        } 
    344          
     343 
    345344        return $result; 
    346345    } 
     
    349348     * Translates all occurrences of / or \ to correct separator of the 
    350349     * current platform and returns whether it had to do any 
    351      * replacements.   
     350     * replacements. 
    352351     */ 
    353352    protected static function translateFileSep(&$buffer, $pos) { 
     
    380379    /** 
    381380     * Overrides the version of DataType to recurse on all DataType 
    382      * child elements that may have been added.   
     381     * child elements that may have been added. 
    383382     * @throws BuildException 
    384383     */ 
     
    388387            return; 
    389388        } 
    390      
     389 
    391390        // elements can contain strings, FileSets, Reference, etc. 
    392391        foreach($this->elements as $o) { 
    393              
     392 
    394393            if ($o instanceof Reference) { 
    395394                $o = $o->getReferencedObject($p); 
     
    406405            } 
    407406        } 
    408          
     407 
    409408        $this->checked = true; 
    410409    } 
     
    422421        return $relativeName; 
    423422    } 
    424      
     423 
    425424} 
    426425 
     
    433432    private $parts = array(); 
    434433    private $outer; 
    435      
     434 
    436435    public function __construct(Path $outer) { 
    437436        $this->outer = $outer; 
    438437    } 
    439      
     438 
    440439    public function setDir(PhingFile $loc) { 
    441440        $this->parts = array(Path::translateFile($loc->getAbsolutePath()));