Moosh\MooshCommand::expandOptions PHP Method

expandOptions() public method

Make the special replacements of %s in the options
public expandOptions ( )
    public function expandOptions()
    {
        //first copy the options
        $this->expandedOptions = $this->finalOptions;
        foreach ($this->arguments as $arg) {
            //process all options
            //TODO handle %%
            $current_options = array();
            foreach ($this->expandedOptions as $k => $v) {
                $expanded = str_replace('%s', $arg, $v);
                if ($this->verbose && $v != $expanded) {
                    echo "'{$k}' expanded from '{$v}' to '{$expanded}'\n";
                }
                $this->expandedOptions[$k] = $expanded;
            }
        }
    }