src/Core/DirectoryManager.php
public static function FilterArray($targetArray, $valuesToRemove) {
        if (is_array($valuesToRemove)) {
            foreach ($valuesToRemove as $value) {
                if (($key = array_search($value, $targetArray)) !== false) {
                    unset($targetArray[$key]);
                } else {
                    //todo: log that the $value to remove was not found.
                }
            }
        } else {
            //todo: log that the call was made but that $valuesToRemove was not an array.
        }
        return $targetArray;
    }
public static function FilterArray($targetArray, $valuesToRemove) {
        if (is_array($valuesToRemove)) {
            foreach ($valuesToRemove as $value) {
                if (($key = array_search($value, $targetArray)) !== false) {
                    unset($targetArray[$key]);
                } else {
                    //todo: log that the $value to remove was not found.
                }
            }
        } else {
            //todo: log that the call was made but that $valuesToRemove was not an array.
        }
        return $targetArray;
    }
public static function FilterArray ( $ targetArray , $ valuesToRemove ) { if ( is_array ( $ valuesToRemove ) ) { foreach ( $ valuesToRemove as $ value ) { if ( ( $ key = array_search ( $ value , $ targetArray ) ) !== false ) { unset ( $ targetArray [ $ key ] ) ; } else { //todo: log that the $value to remove was not found. } } } else { //todo: log that the call was made but that $valuesToRemove was not an array. } return $ targetArray ; }
Filter values out of a given array of values.

@param array (of mixed) $targetArray : the list of values
@param array(of mixed) $valuesToRemove : the values to remove from $targetArray
Filter values out of a given array of values .