Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sortable interface #1116

Closed
wants to merge 8 commits into from

Conversation

3 participants
@gielfeldt
Copy link

commented Feb 24, 2015

This implements a new interface Sortable.

Works with *sort() functions.

Could be quite powerful when combined with Comparable (#1097)

/** @ingroup SPL
 * @brief This Interface allows to hook into the global sort() functions.
 * @since PHP 5.6
 */
interface Sortable
{
  /** Sort the entries by values.
   */
  function sort($sort_flags = SORT_REGULAR);

  /** Sort the entries by values in reverse
   */
  function rsort($sort_flags = SORT_REGULAR);

  /** Sort the entries by values and maintain indexes.
   */
  function asort($sort_flags = SORT_REGULAR);

  /** Sort the entries by values in reverse and maintain indexes.
   */
  function arsort($sort_flags = SORT_REGULAR);

  /** Sort the entries by key.
   */
  function ksort($sort_flags = SORT_REGULAR);

  /** Sort the entries by key in reverse.
   */
  function krsort($sort_flags = SORT_REGULAR);

  /** Sort the entries by values using user defined function.
   */
  function usort(mixed cmp_function);

  /** Sort the entries by values using user defined function and maintain index.
   */
  function uasort(mixed cmp_function);

  /** Sort the entries by key using user defined function.
   */
  function uksort(mixed cmp_function);

  /** Sort the entries by values using "natural order" algorithm.
   */
  function natsort();

  /** Sort the entries by values using case insensitive "natural order" algorithm.
   */
  function natcasesort();

}

Requesting a pull to php:master from php:sortable-interface

Write a message for this pull request. The first block

of text is the title and the rest is description.

@smalyshev smalyshev added the RFC label Mar 9, 2015

@krakjoe

This comment has been minimized.

Copy link
Member

commented Jan 7, 2017

@gielfeldt this has merge conflicts, and I cannot find the RFC.

Please can we get an update on the status of this work ?

If you consider this work abandoned, please close this PR yourself.

@krakjoe

This comment has been minimized.

Copy link
Member

commented Feb 22, 2017

Having waited more than a month for feedback, and having received nothing, I'm closing this PR as it would appear abandoned.

@krakjoe krakjoe closed this Feb 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.