PHP code example of mouf / utils.common.sortable-interface

1. Go to this page and download the library: Download mouf/utils.common.sortable-interface library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mouf / utils.common.sortable-interface example snippets


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);
}