mouf/utils.common.sortable-interface 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mouf/utils.common.sortable-interface

最新稳定版本:v1.0.0

Composer 安装命令:

composer require mouf/utils.common.sortable-interface

包简介

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!

README 文档

README

This package contains an interface used by many objects to declare they have the ability to sort the result set they represent.

If your objects represent a resultset (for instance your object is a resultset from a query to a database), and if you can sort this result set (on a column of the resultset), then your object should implement SortableInterface.

interface SortableInterface {
	const ASC = "ASC";
	const DESC = "DESC";
	
	/**
	 * Sorts the result set.
	 * 
	 * @param string $key The key to sort upon
	 * @param string $direction Either SortableInterface::ASC or SortableInterface::DESC
	 */
	public function sort($key, $direction = self::ASC);
}

Mouf package

This package is part of Mouf (http://mouf-php.com), an effort to ensure good developing practices by providing a graphical dependency injection framework.

统计信息

  • 总下载量: 240.39k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 10
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-07-13