public function getFixesForLevel($level)
    {
        if ($level == $this->levels[0]) {
            return array();
        }
        $activated_levels = array();
        for ($i = 1, $c = count($this->levels); $i < $c; $i++) {
            $activated_levels[] = $this->levels[$i];
            if ($this->levels[$i] == $level) {
                break;
            }
        }
        if ($i == $c) {
            trigger_error(
                'Tidy level ' . htmlspecialchars($level) . ' not recognized',
                E_USER_WARNING
            );
            return array();
        }
        $ret = array();
        foreach ($activated_levels as $level) {
            foreach ($this->fixesForLevel[$level] as $fix) {
                $ret[$fix] = true;
            }
        }
        return $ret;
    }
public function getFixesForLevel($level)
    {
        if ($level == $this->levels[0]) {
            return array();
        }
        $activated_levels = array();
        for ($i = 1, $c = count($this->levels); $i < $c; $i++) {
            $activated_levels[] = $this->levels[$i];
            if ($this->levels[$i] == $level) {
                break;
            }
        }
        if ($i == $c) {
            trigger_error(
                'Tidy level ' . htmlspecialchars($level) . ' not recognized',
                E_USER_WARNING
            );
            return array();
        }
        $ret = array();
        foreach ($activated_levels as $level) {
            foreach ($this->fixesForLevel[$level] as $fix) {
                $ret[$fix] = true;
            }
        }
        return $ret;
    }
public function getFixesForLevel ( $ level ) { if ( $ level == $ this -> levels [ 0 ] ) { return array ( ) ; } $ activated_levels = array ( ) ; for ( $ i = 1 , $ c = count ( $ this -> levels ) ; $ i < $ c ; $ i ++ ) { $ activated_levels [ ] = $ this -> levels [ $ i ] ; if ( $ this -> levels [ $ i ] == $ level ) { break ; } } if ( $ i == $ c ) { trigger_error ( 'Tidy level ' . htmlspecialchars ( $ level ) . ' not recognized' , E_USER_WARNING ) ; return array ( ) ; } $ ret = array ( ) ; foreach ( $ activated_levels as $ level ) { foreach ( $ this -> fixesForLevel [ $ level ] as $ fix ) { $ ret [ $ fix ] = true ; } } return $ ret ; }
Retrieves all fixes per a level, returning fixes for that specific
level as well as all levels below it.
@param string $level level identifier, see $levels for valid values
@return array Lookup up table of fixes
Retrieves all fixes per a level returning fixes for that specific level as well as all levels below it .