public static function getList()
    {
        $calledClass = get_called_class();
        if (!isset(static::$list[$calledClass])) {
            $refClass = new \ReflectionClass($calledClass);
            $labels   = static::getLabels();
            foreach ($refClass->getConstants() as $constName => $constValue) {
                if (isset($labels[$constValue])) {
                    $label = $labels[$constValue];
                } else {
                    $label = lcfirst(strtolower($constName));
                }
                static::$list[$calledClass][$constValue] = $label;
            }
        }
        return static::$list[$calledClass];
    }
public static function getList()
    {
        $calledClass = get_called_class();
        if (!isset(static::$list[$calledClass])) {
            $refClass = new \ReflectionClass($calledClass);
            $labels   = static::getLabels();
            foreach ($refClass->getConstants() as $constName => $constValue) {
                if (isset($labels[$constValue])) {
                    $label = $labels[$constValue];
                } else {
                    $label = lcfirst(strtolower($constName));
                }
                static::$list[$calledClass][$constValue] = $label;
            }
        }
        return static::$list[$calledClass];
    }
public static function getList ( ) { $ calledClass = get_called_class ( ) ; if ( ! isset ( static :: $ list [ $ calledClass ] ) ) { $ refClass = new \ ReflectionClass ( $ calledClass ) ; $ labels = static :: getLabels ( ) ; foreach ( $ refClass -> getConstants ( ) as $ constName => $ constValue ) { if ( isset ( $ labels [ $ constValue ] ) ) { $ label = $ labels [ $ constValue ] ; } else { $ label = lcfirst ( strtolower ( $ constName ) ) ; } static :: $ list [ $ calledClass ] [ $ constValue ] = $ label ; } } return static :: $ list [ $ calledClass ] ; }
Get list constants
@return mixed
Get list constants