public function addOptions($aOptions)
    {
        foreach ($aOptions as $aOption) {
            if ($aOption instanceof Option) {
                $this->aOptions[] = $aOption;
            } else {
                $sLabel      = getFromArray('label', $aOption, getFromArray(0, $aOption));
                $mValue      = getFromArray('value', $aOption, getFromArray(1, $aOption));
                $bIsSelected = (bool) getFromArray('selected', $aOption, getFromArray(2, $aOption));
                $bIsQuery    = (bool) getFromArray('query', $aOption, getFromArray(3, $aOption));
                $this->addOption($sLabel, $mValue, $bIsSelected, $bIsQuery);
            }
        }

        return $this;
    }
public function addOptions($aOptions)
    {
        foreach ($aOptions as $aOption) {
            if ($aOption instanceof Option) {
                $this->aOptions[] = $aOption;
            } else {
                $sLabel      = getFromArray('label', $aOption, getFromArray(0, $aOption));
                $mValue      = getFromArray('value', $aOption, getFromArray(1, $aOption));
                $bIsSelected = (bool) getFromArray('selected', $aOption, getFromArray(2, $aOption));
                $bIsQuery    = (bool) getFromArray('query', $aOption, getFromArray(3, $aOption));
                $this->addOption($sLabel, $mValue, $bIsSelected, $bIsQuery);
            }
        }

        return $this;
    }
public function addOptions ( $ aOptions ) { foreach ( $ aOptions as $ aOption ) { if ( $ aOption instanceof Option ) { $ this -> aOptions [ ] = $ aOption ; } else { $ sLabel = getFromArray ( 'label' , $ aOption , getFromArray ( 0 , $ aOption ) ) ; $ mValue = getFromArray ( 'value' , $ aOption , getFromArray ( 1 , $ aOption ) ) ; $ bIsSelected = ( bool ) getFromArray ( 'selected' , $ aOption , getFromArray ( 2 , $ aOption ) ) ; $ bIsQuery = ( bool ) getFromArray ( 'query' , $ aOption , getFromArray ( 3 , $ aOption ) ) ; $ this -> addOption ( $ sLabel , $ mValue , $ bIsSelected , $ bIsQuery ) ; } } return $ this ; }
Add multiple options

@param array $aOptions An array of options to add

@return $this
Add multiple options