public static function outcome_from_results($results) {
        $outcome = self::BACKUP_STATUS_OK;
        foreach ($results as $code => $value) {
            // Each possible error and warning code has to be specified in this switch
            // which basically analyses the results to return the correct backup status.
            switch ($code) {
                case 'missing_files_in_pool':
                    $outcome = self::BACKUP_STATUS_WARNING;
                    break;
            }
            // If we found the highest error level, we exit the loop.
            if ($outcome == self::BACKUP_STATUS_ERROR) {
                break;
            }
        }
        return $outcome;
    }
public static function outcome_from_results($results) {
        $outcome = self::BACKUP_STATUS_OK;
        foreach ($results as $code => $value) {
            // Each possible error and warning code has to be specified in this switch
            // which basically analyses the results to return the correct backup status.
            switch ($code) {
                case 'missing_files_in_pool':
                    $outcome = self::BACKUP_STATUS_WARNING;
                    break;
            }
            // If we found the highest error level, we exit the loop.
            if ($outcome == self::BACKUP_STATUS_ERROR) {
                break;
            }
        }
        return $outcome;
    }
public static function outcome_from_results ( $ results ) { $ outcome = self :: BACKUP_STATUS_OK ; foreach ( $ results as $ code => $ value ) { // Each possible error and warning code has to be specified in this switch // which basically analyses the results to return the correct backup status. switch ( $ code ) { case 'missing_files_in_pool' : $ outcome = self :: BACKUP_STATUS_WARNING ; break ; } // If we found the highest error level, we exit the loop. if ( $ outcome == self :: BACKUP_STATUS_ERROR ) { break ; } } return $ outcome ; }
Returns the backup outcome by analysing its results.

@param array $results returned by a backup
@return int {@link self::BACKUP_STATUS_OK} and other constants
Returns the backup outcome by analysing its results .