public static function getConstants($name) 
    {
        if (isset(self::$_const[$name])) {
            return self::$_const[$name];
        }
        $self = new \ReflectionClass(new static());
        $contants = $self->getConstants();
        $prefix = strtoupper($name) . '_';
        $prefixLength = strlen($prefix);
        $prefixOffset = $prefixLength - 1;
        self::$_const[$name] = [];
        foreach ($contants as $key => $value) {
            if (substr($key, 0, $prefixLength) === $prefix) {
                self::$_const[$name][$value] = ucwords(strtolower(Inflector::humanize(substr($key, $prefixLength))));
            }
        }
        return self::$_const[$name];
    }
public static function getConstants($name) 
    {
        if (isset(self::$_const[$name])) {
            return self::$_const[$name];
        }
        $self = new \ReflectionClass(new static());
        $contants = $self->getConstants();
        $prefix = strtoupper($name) . '_';
        $prefixLength = strlen($prefix);
        $prefixOffset = $prefixLength - 1;
        self::$_const[$name] = [];
        foreach ($contants as $key => $value) {
            if (substr($key, 0, $prefixLength) === $prefix) {
                self::$_const[$name][$value] = ucwords(strtolower(Inflector::humanize(substr($key, $prefixLength))));
            }
        }
        return self::$_const[$name];
    }
public static function getConstants ( $ name ) { if ( isset ( self :: $ _const [ $ name ] ) ) { return self :: $ _const [ $ name ] ; } $ self = new \ ReflectionClass ( new static ( ) ) ; $ contants = $ self -> getConstants ( ) ; $ prefix = strtoupper ( $ name ) . '_' ; $ prefixLength = strlen ( $ prefix ) ; $ prefixOffset = $ prefixLength - 1 ; self :: $ _const [ $ name ] = [ ] ; foreach ( $ contants as $ key => $ value ) { if ( substr ( $ key , 0 , $ prefixLength ) === $ prefix ) { self :: $ _const [ $ name ] [ $ value ] = ucwords ( strtolower ( Inflector :: humanize ( substr ( $ key , $ prefixLength ) ) ) ) ; } } return self :: $ _const [ $ name ] ; }
get constants by name

@param string $name
@return array
get constants by name