public function forwardOption($name, $target, $targetName = null)
    {

        $targetName = $targetName ? $targetName : $name;
        if (isset($this->options[$name]))
            $this->options[$target][$targetName] = $this->options[$name];
    }
public function forwardOption($name, $target, $targetName = null)
    {

        $targetName = $targetName ? $targetName : $name;
        if (isset($this->options[$name]))
            $this->options[$target][$targetName] = $this->options[$name];
    }
public function forwardOption ( $ name , $ target , $ targetName = null ) { $ targetName = $ targetName ? $ targetName : $ name ; if ( isset ( $ this -> options [ $ name ] ) ) $ this -> options [ $ target ] [ $ targetName ] = $ this -> options [ $ name ] ; }
Forwards an option to an option array.

e.g.
options = [
'target' => [
'targetName' => null
],

'someOption' => 'someValue'
]

options->forwardOption('someOption', 'target', 'targetName')
will set ['target']['targetName'] to 'someValue'

Notice that the third parameter can be omitted, it will
be set to the same name as the first parameter then.

@param string $name       the name of the option to forward
@param string $target     the name of the option array to forward to
@param string $targetName the name of the target option name inside the target array
Forwards an option to an option array .