protected function selfFormat(XType $type, $value, $view, $lang)
    {

        if ($type instanceof BoolType) {
            return $this->formatBool($type, $value, $view, $lang);
        }

        if ($type instanceof UnitType) {
            return $this->formatUnit($type, $value, $view, $lang);
        }

        if ($type instanceof NumberType) {
            return $this->formatNumber($type, $value, $view, $lang);
        }

        if ($type instanceof StringType) {
            return $this->formatString($type, $value, $view, $lang);
        }

        if ($type instanceof TemporalType) {
            return $this->formatTemporal($type, $value, $view, $lang);
        }

        return 'NaN';
    }
protected function selfFormat(XType $type, $value, $view, $lang)
    {

        if ($type instanceof BoolType) {
            return $this->formatBool($type, $value, $view, $lang);
        }

        if ($type instanceof UnitType) {
            return $this->formatUnit($type, $value, $view, $lang);
        }

        if ($type instanceof NumberType) {
            return $this->formatNumber($type, $value, $view, $lang);
        }

        if ($type instanceof StringType) {
            return $this->formatString($type, $value, $view, $lang);
        }

        if ($type instanceof TemporalType) {
            return $this->formatTemporal($type, $value, $view, $lang);
        }

        return 'NaN';
    }
protected function selfFormat ( XType $ type , $ value , $ view , $ lang ) { if ( $ type instanceof BoolType ) { return $ this -> formatBool ( $ type , $ value , $ view , $ lang ) ; } if ( $ type instanceof UnitType ) { return $ this -> formatUnit ( $ type , $ value , $ view , $ lang ) ; } if ( $ type instanceof NumberType ) { return $ this -> formatNumber ( $ type , $ value , $ view , $ lang ) ; } if ( $ type instanceof StringType ) { return $ this -> formatString ( $ type , $ value , $ view , $ lang ) ; } if ( $ type instanceof TemporalType ) { return $ this -> formatTemporal ( $ type , $ value , $ view , $ lang ) ; } return 'NaN' ; }
Do the formatting by this class.

@param XType $type
@param $value
@param $view
@param $lang

@return string
Do the formatting by this class .