public function has($key, $getExpr = false)
    {
        foreach ($this->options as $option) {
            if (is_array($option)) {
                if (! strcasecmp($key, $option['name'])) {
                    return $getExpr ? $option['expr'] : $option['value'];
                }
            } elseif (! strcasecmp($key, $option)) {
                return true;
            }
        }

        return false;
    }
public function has($key, $getExpr = false)
    {
        foreach ($this->options as $option) {
            if (is_array($option)) {
                if (! strcasecmp($key, $option['name'])) {
                    return $getExpr ? $option['expr'] : $option['value'];
                }
            } elseif (! strcasecmp($key, $option)) {
                return true;
            }
        }

        return false;
    }
public function has ( $ key , $ getExpr = false ) { foreach ( $ this -> options as $ option ) { if ( is_array ( $ option ) ) { if ( ! strcasecmp ( $ key , $ option [ 'name' ] ) ) { return $ getExpr ? $ option [ 'expr' ] : $ option [ 'value' ] ; } } elseif ( ! strcasecmp ( $ key , $ option ) ) { return true ; } } return false ; }
Checks if it has the specified option and returns it value or true.

@param string $key     the key to be checked
@param bool   $getExpr Gets the expression instead of the value.
The value is the processed form of the expression.

@return mixed
Checks if it has the specified option and returns it value or true .