001    /**
002     * Implements the Cold Fusion Function arraysort
003     */
004    package railo.runtime.functions.arrays;
005    
006    import railo.runtime.PageContext;
007    import railo.runtime.exp.PageException;
008    import railo.runtime.ext.function.Function;
009    import railo.runtime.type.Array;
010    
011    public final class ArraySort implements Function {
012            public static boolean call(PageContext pc , Array array, String sorttype) throws PageException {
013                    return call(pc , array, sorttype, "asc");
014            }
015            public static boolean call(PageContext pc , Array array, String sorttype, String sortorder) throws PageException {
016                    array.sort(sorttype, sortorder);
017                    return true;
018            }
019    }