public static function phpToXml($value)
    {
        switch (true) {
            case null === $value:
                return 'null';
            case true === $value:
                return 'true';
            case false === $value:
                return 'false';
            case $value instanceof Parameter:
                return '%'.$value.'%';
            case is_object($value) || is_resource($value):
                throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
            default:
                return (string) $value;
        }
    }
public static function phpToXml($value)
    {
        switch (true) {
            case null === $value:
                return 'null';
            case true === $value:
                return 'true';
            case false === $value:
                return 'false';
            case $value instanceof Parameter:
                return '%'.$value.'%';
            case is_object($value) || is_resource($value):
                throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
            default:
                return (string) $value;
        }
    }
public static function phpToXml ( $ value ) { switch ( true ) { case null === $ value : return 'null' ; case true === $ value : return 'true' ; case false === $ value : return 'false' ; case $ value instanceof Parameter : return '%' . $ value . '%' ; case is_object ( $ value ) || is_resource ( $ value ) : throw new RuntimeException ( 'Unable to dump a service container if a parameter is an object or a resource.' ) ; default : return ( string ) $ value ; } }
Converts php types to xml types.

@param mixed $value Value to convert

@return string

@throws RuntimeException When trying to dump object or resource
Converts php types to xml types .