public function hasNeeds($optionsList)
    {
        $needs = $this->getNeeds();

        $definedOptions = array_keys($optionsList);
        $notFound = array();
        foreach ($needs as $need) {
            if (!in_array($need, $definedOptions)) {
                // The needed option has not been defined as a valid flag.
                $notFound[] = $need;
            } elseif (!$optionsList[$need]->getValue()) {
                // The needed option has been defined as a valid flag, but was
                // not pased in by the user.
                $notFound[] = $need;
            }
        }
        return (empty($notFound)) ? true : $notFound;

    }
public function hasNeeds($optionsList)
    {
        $needs = $this->getNeeds();

        $definedOptions = array_keys($optionsList);
        $notFound = array();
        foreach ($needs as $need) {
            if (!in_array($need, $definedOptions)) {
                // The needed option has not been defined as a valid flag.
                $notFound[] = $need;
            } elseif (!$optionsList[$need]->getValue()) {
                // The needed option has been defined as a valid flag, but was
                // not pased in by the user.
                $notFound[] = $need;
            }
        }
        return (empty($notFound)) ? true : $notFound;

    }
public function hasNeeds ( $ optionsList ) { $ needs = $ this -> getNeeds ( ) ; $ definedOptions = array_keys ( $ optionsList ) ; $ notFound = array ( ) ; foreach ( $ needs as $ need ) { if ( ! in_array ( $ need , $ definedOptions ) ) { // The needed option has not been defined as a valid flag. $ notFound [ ] = $ need ; } elseif ( ! $ optionsList [ $ need ] -> getValue ( ) ) { // The needed option has been defined as a valid flag, but was // not pased in by the user. $ notFound [ ] = $ need ; } } return ( empty ( $ notFound ) ) ? true : $ notFound ; }
Check to see if requirements list for option are met

@param array $optionsList Set of current options defined
@return boolean|array True if requirements met, array if not found
Check to see if requirements list for option are met