src/Codegen/TypeTable.php
public static function literal($mixColValue)
    {
        if (is_null($mixColValue)) {
            return 'null';
        } elseif (is_integer($mixColValue)) {
            return $mixColValue;
        } elseif (is_bool($mixColValue)) {
            return ($mixColValue ? 'true' : 'false');
        } elseif (is_float($mixColValue)) {
            return "(float)$mixColValue";
        } elseif (is_object($mixColValue)) {
            return "t('" . $mixColValue->_toString() . "')";
        }    // whatever is suitable for the constructor of the object
        else {
            return "t('" . str_replace("'", "\\'", $mixColValue) . "')";
        }
    }
public static function literal($mixColValue)
    {
        if (is_null($mixColValue)) {
            return 'null';
        } elseif (is_integer($mixColValue)) {
            return $mixColValue;
        } elseif (is_bool($mixColValue)) {
            return ($mixColValue ? 'true' : 'false');
        } elseif (is_float($mixColValue)) {
            return "(float)$mixColValue";
        } elseif (is_object($mixColValue)) {
            return "t('" . $mixColValue->_toString() . "')";
        }    // whatever is suitable for the constructor of the object
        else {
            return "t('" . str_replace("'", "\\'", $mixColValue) . "')";
        }
    }
public static function literal ( $ mixColValue ) { if ( is_null ( $ mixColValue ) ) { return 'null' ; } elseif ( is_integer ( $ mixColValue ) ) { return $ mixColValue ; } elseif ( is_bool ( $ mixColValue ) ) { return ( $ mixColValue ? 'true' : 'false' ) ; } elseif ( is_float ( $ mixColValue ) ) { return "(float)$mixColValue" ; } elseif ( is_object ( $ mixColValue ) ) { return "t('" . $ mixColValue -> _toString ( ) . "')" ; } // whatever is suitable for the constructor of the object else { return "t('" . str_replace ( "'" , "\\'" , $ mixColValue ) . "')" ; } }
Returns the string that will be used to represent the literal value given when codegenning a type table
@param mixed $mixColValue
@return string
Returns the string that will be used to represent the literal value given when codegenning a type table