Sort class to use with PHP's usort function.
- Autor
- Daniel Hartmann [danie.nosp@m.l@so.nosp@m.lis.c.nosp@m.oop..nosp@m.br]
Maintainers:
Armando Taffarel Neto [taffa.nosp@m.rel@.nosp@m.solis.nosp@m..coo.nosp@m.p.br] Daniel Hartmann [danie.nosp@m.l@so.nosp@m.lis.c.nosp@m.oop..nosp@m.br]
- Desde
- Creation date 2012/05/07
Organization:
SOLIS - Cooperativa de Soluções Livres
Copyright:
Copyright (c) 2012 SOLIS - Cooperativa de Soluções Livres
License:
Licensed under GPLv2 (for further details read the COPYING file or http://www.gnu.org/licenses/gpl.html)
◆ __construct()
__construct |
( |
| $order, |
|
|
| $key = NULL, |
|
|
| $dateTimeMask = '' ) |
MSort constructor.
- Parâmetros
-
string | $order | Sort order. Possible values are ASC and DESC. |
string | $dateTimeMask | Date and/or time mask. |
◆ compare()
Compare two values.
- Parâmetros
-
mixed | $v1 | First value. |
mixed | $v2 | Second value. |
- Retorna
- integer Returns -1 if the second parameter must be above the first. Returns 1 to the opposite behavior and 0 for keeping positions.
◆ compareDate()
Compare dates/times in the format specified by datetimeMask attribute.
- Parâmetros
-
string | $d1 | Date/time. |
string | $d2 | Date/time. |
- Retorna
- integer Returns -1 if the second parameter must be above the first. Returns 1 to the opposite behavior and 0 for keeping positions.
◆ MASK_DATE_BR
const MASK_DATE_BR = '%d/%m/%Y' |
◆ MASK_DATE_EN
const MASK_DATE_EN = '%m/%d/%Y' |
◆ MASK_DATETIME_BR
const MASK_DATETIME_BR = '%d/%m/%Y %H:%M:%S' |
◆ MASK_DATETIME_EN
const MASK_DATETIME_EN = '%m/%d/%Y %H:%M:%S' |
◆ MASK_TIME
const MASK_TIME = '%H:%M:%S' |
A documentação para esta classe foi gerada a partir do seguinte ficheiro:
- /var/docker/solisge-devel/www/solisge/miolo25/classes/utils/msort.class.php