classes/phing/tasks/ext/PearPackageTask.php
private function populateOptions()
    {

        // These values could be overridden if explicitly defined using nested tags
        $this->preparedOptions['package'] = $this->package;
        $this->preparedOptions['packagedirectory'] = $this->dir->getAbsolutePath();

        if ($this->packageFile !== null) {
            // create one w/ full path
            $f = new PhingFile($this->packageFile->getAbsolutePath());
            $this->preparedOptions['packagefile'] = $f->getName();
            // must end in trailing slash
            $this->preparedOptions['outputdirectory'] = $f->getParent() . DIRECTORY_SEPARATOR;
            $this->log("Creating package file: " . $f->__toString(), Project::MSG_INFO);
        } else {
            $this->log("Creating [default] package.xml file in base directory.", Project::MSG_INFO);
        }

        // converts option objects and mapping objects into
        // key => value options that can be passed to PEAR_PackageFileManager

        foreach ($this->options as $opt) {
            $this->preparedOptions[$opt->getName()] = $opt->getValue(); //no arrays yet. preg_split('/\s*,\s*/', $opt->getValue());
        }

        foreach ($this->mappings as $map) {
            $value = $map->getValue(); // getValue returns complex value

            if ($map->getName() == 'deps') {
                $value = $this->fixDeps($value);
            }

            $this->preparedOptions[$map->getName()] = $value;
        }
    }
private function populateOptions()
    {

        // These values could be overridden if explicitly defined using nested tags
        $this->preparedOptions['package'] = $this->package;
        $this->preparedOptions['packagedirectory'] = $this->dir->getAbsolutePath();

        if ($this->packageFile !== null) {
            // create one w/ full path
            $f = new PhingFile($this->packageFile->getAbsolutePath());
            $this->preparedOptions['packagefile'] = $f->getName();
            // must end in trailing slash
            $this->preparedOptions['outputdirectory'] = $f->getParent() . DIRECTORY_SEPARATOR;
            $this->log("Creating package file: " . $f->__toString(), Project::MSG_INFO);
        } else {
            $this->log("Creating [default] package.xml file in base directory.", Project::MSG_INFO);
        }

        // converts option objects and mapping objects into
        // key => value options that can be passed to PEAR_PackageFileManager

        foreach ($this->options as $opt) {
            $this->preparedOptions[$opt->getName()] = $opt->getValue(); //no arrays yet. preg_split('/\s*,\s*/', $opt->getValue());
        }

        foreach ($this->mappings as $map) {
            $value = $map->getValue(); // getValue returns complex value

            if ($map->getName() == 'deps') {
                $value = $this->fixDeps($value);
            }

            $this->preparedOptions[$map->getName()] = $value;
        }
    }
private function populateOptions ( ) { // These values could be overridden if explicitly defined using nested tags $ this -> preparedOptions [ 'package' ] = $ this -> package ; $ this -> preparedOptions [ 'packagedirectory' ] = $ this -> dir -> getAbsolutePath ( ) ; if ( $ this -> packageFile !== null ) { // create one w/ full path $ f = new PhingFile ( $ this -> packageFile -> getAbsolutePath ( ) ) ; $ this -> preparedOptions [ 'packagefile' ] = $ f -> getName ( ) ; // must end in trailing slash $ this -> preparedOptions [ 'outputdirectory' ] = $ f -> getParent ( ) . DIRECTORY_SEPARATOR ; $ this -> log ( "Creating package file: " . $ f -> __toString ( ) , Project :: MSG_INFO ) ; } else { $ this -> log ( "Creating [default] package.xml file in base directory." , Project :: MSG_INFO ) ; } // converts option objects and mapping objects into // key => value options that can be passed to PEAR_PackageFileManager foreach ( $ this -> options as $ opt ) { $ this -> preparedOptions [ $ opt -> getName ( ) ] = $ opt -> getValue ( ) ; //no arrays yet. preg_split('/\s*,\s*/', $opt->getValue()); } foreach ( $ this -> mappings as $ map ) { $ value = $ map -> getValue ( ) ; // getValue returns complex value if ( $ map -> getName ( ) == 'deps' ) { $ value = $ this -> fixDeps ( $ value ) ; } $ this -> preparedOptions [ $ map -> getName ( ) ] = $ value ; } }
Adds the options that are set via attributes and the nested tags to the options array.
Adds the options that are set via attributes and the nested tags to the options array .