{"id":18929388,"url":"https://github.com/thecodingmachine/utils.common.sortable-interface","last_synced_at":"2026-03-16T14:30:17.612Z","repository":{"id":9495200,"uuid":"11386802","full_name":"thecodingmachine/utils.common.sortable-interface","owner":"thecodingmachine","description":"This package contains an interface used by objects to say they can sort data. The concept is very simple, the object implements a sort method that takes a key (the sort column) and a direction, and that's it!","archived":false,"fork":false,"pushed_at":"2017-05-17T16:17:42.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":12,"default_branch":"1.0","last_synced_at":"2025-02-16T12:30:30.751Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodingmachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-13T10:55:11.000Z","updated_at":"2019-04-24T12:19:34.000Z","dependencies_parsed_at":"2022-09-22T14:41:04.865Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/utils.common.sortable-interface","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.common.sortable-interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.common.sortable-interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.common.sortable-interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Futils.common.sortable-interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/utils.common.sortable-interface/tar.gz/refs/heads/1.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239927823,"owners_count":19719835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T11:32:18.299Z","updated_at":"2026-03-16T14:30:17.564Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"What is this package\n====================\n\nThis package contains an interface used by many objects to declare they have the ability\nto sort the result set they represent.\n\nIf your objects represent a resultset (for instance your object is a resultset from a query to a database), \nand if you can sort this result set (on a column of the resultset), \nthen your object should implement *SortableInterface*.\n\n```php\ninterface SortableInterface {\n\tconst ASC = \"ASC\";\n\tconst DESC = \"DESC\";\n\t\n\t/**\n\t * Sorts the result set.\n\t * \n\t * @param string $key The key to sort upon\n\t * @param string $direction Either SortableInterface::ASC or SortableInterface::DESC\n\t */\n\tpublic function sort($key, $direction = self::ASC);\n}\n```\n\nMouf package\n------------\n\nThis package is part of Mouf (http://mouf-php.com), an effort to ensure good developing practices by providing a graphical dependency injection framework.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Futils.common.sortable-interface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Futils.common.sortable-interface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Futils.common.sortable-interface/lists"}