note 87885 deleted from function.usort by danbrown

From: Date: Mon, 29 Dec 2008 02:08:35 +0000
Subject: note 87885 deleted from function.usort by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148631@lists.php.net to get a copy of this message
Note Submitter: jalil at measat dot org ---- /*--------------------------------------------------------- * my own home made easy object sort, which * i cannot find anywhere on the net * at all, tut. i can find only complicated ones, * which brings me a headache. * * You can enhance it to return all sorts of error * conditions if you wish, * i need nothing but a false return upon failure to sort, * so that is the only error i have here * * Example usage: * * INPUT - $objects_array // an array of objects for sorting * PARAMETERS - property // the property of the object to be sorted * OUTPUT - $engine // an engine object created by new, // with your arrays of objects sorted according to your // selected property //( the sorting is done upon sort object creation ) * * Code Examples * * $engine = new objSorter($objects_array); // sorts on FIRST property - default * $engine = new objSorter($objects_array,'property'); // sort on ANY specific property *--------------------------------------------------------*/

« previous php.notes (#148631) next »