Utils/PDFLabelFormat.php
public function getValue( $field, $default = null ) {
        if ( array_key_exists($field, $this->defaults) ){
            switch ($this->defaults[$field]['type']) {
                case self::TYPE_INT:
                    return (int) $this->values[$field];
                case self::TYPE_FLOAT:
                    // Round float values to three decimal places and trim trailing zeros.
                    // Add a leading zero to values less than 1.
                    $f = sprintf('%05.3f', $this->values[$field]);
                    $f = rtrim($f, '0');
                    $f = rtrim($f, '.');
                    return (float) (empty($f) ? '0' : $f);
            }
            return $this->values[$field];
        }

        return $default;
    }
public function getValue( $field, $default = null ) {
        if ( array_key_exists($field, $this->defaults) ){
            switch ($this->defaults[$field]['type']) {
                case self::TYPE_INT:
                    return (int) $this->values[$field];
                case self::TYPE_FLOAT:
                    // Round float values to three decimal places and trim trailing zeros.
                    // Add a leading zero to values less than 1.
                    $f = sprintf('%05.3f', $this->values[$field]);
                    $f = rtrim($f, '0');
                    $f = rtrim($f, '.');
                    return (float) (empty($f) ? '0' : $f);
            }
            return $this->values[$field];
        }

        return $default;
    }
public function getValue ( $ field , $ default = null ) { if ( array_key_exists ( $ field , $ this -> defaults ) ) { switch ( $ this -> defaults [ $ field ] [ 'type' ] ) { case self :: TYPE_INT : return ( int ) $ this -> values [ $ field ] ; case self :: TYPE_FLOAT : // Round float values to three decimal places and trim trailing zeros. // Add a leading zero to values less than 1. $ f = sprintf ( '%05.3f' , $ this -> values [ $ field ] ) ; $ f = rtrim ( $ f , '0' ) ; $ f = rtrim ( $ f , '.' ) ; return ( float ) ( empty ( $ f ) ? '0' : $ f ) ; } return $ this -> values [ $ field ] ; } return $ default ; }
Get Label Format field from associative array.

@param string        $field Name of a label format field.
@param null|string   $default
@return float|int|mixed|null
Get Label Format field from associative array .