Symfony\Component\DependencyInjection\Dumper\XmlDumper::phpToXml PHP Method

phpToXml() public static method

Converts php types to xml types.
public static phpToXml ( mixed $value )
$value mixed Value to convert
    static public function phpToXml($value)
    {
        switch (true) {
            case null === $value:
                return 'null';
            case true === $value:
                return 'true';
            case false === $value:
                return 'false';
            case is_object($value) && $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;
        }
    }