protected function getMappedFile($from)
    {
        if (!$this->mapperElement) {
            throw new BuildException("This task requires you to use a <mapper/> element to describe how filename changes should be handled.");
        }

        $mapper = $this->mapperElement->getImplementation();
        $mapped = $mapper->main($from);
        if (!$mapped) {
            throw new BuildException("Cannot create new filename based on: " . $from);
        }
        // Mappers always return arrays since it's possible for some mappers to map to multiple names.
        $outFilename = array_shift($mapped);
        $outFile = new PhingFile($this->getOutputDirectory(), $outFilename);

        return $outFile;
    }
protected function getMappedFile($from)
    {
        if (!$this->mapperElement) {
            throw new BuildException("This task requires you to use a <mapper/> element to describe how filename changes should be handled.");
        }

        $mapper = $this->mapperElement->getImplementation();
        $mapped = $mapper->main($from);
        if (!$mapped) {
            throw new BuildException("Cannot create new filename based on: " . $from);
        }
        // Mappers always return arrays since it's possible for some mappers to map to multiple names.
        $outFilename = array_shift($mapped);
        $outFile = new PhingFile($this->getOutputDirectory(), $outFilename);

        return $outFile;
    }
protected function getMappedFile ( $ from ) { if ( ! $ this -> mapperElement ) { throw new BuildException ( "This task requires you to use a <mapper/> element to describe how filename changes should be handled." ) ; } $ mapper = $ this -> mapperElement -> getImplementation ( ) ; $ mapped = $ mapper -> main ( $ from ) ; if ( ! $ mapped ) { throw new BuildException ( "Cannot create new filename based on: " . $ from ) ; } // Mappers always return arrays since it's possible for some mappers to map to multiple names. $ outFilename = array_shift ( $ mapped ) ; $ outFile = new PhingFile ( $ this -> getOutputDirectory ( ) , $ outFilename ) ; return $ outFile ; }
Maps the passed in name to a new filename & returns resolved File object.

@param string $from

@return PhingFile      Resolved File object.
@throws BuildException - if no Mapper element se
- if unable to map new filename.
Maps the passed in name to a new filename & returns resolved File object .