2015-02-25 13:21 GMT+03:00 Thomas Gielfeldt <tho...@gielfeldt.dk>: > I have some more proposals for how to implement this interface. Should we > create an RFC for purposes of discussion, or do you usually do this in the > mailing lists? >
Best interface is described by the one single method: sort() that accepts optional flags and callback function: So, interface Sortable { const ASC = 1; const DESC = 2; const SORT_REGULAR = 4; const SORT_NUMERIC = 8; // more consts here... public function sort($flags = 0, callable $callback = null); } Callback will accept key and value pair.