Sanitizer
class Sanitizer (View source)
Properties
| protected Filesystem | $filesystem | The Filesystem instance to be used for file operations.  | 
                
Methods
                    __construct(Filesystem $filesystem)
        
                                            
                
            Initialize the instance.
                    sanitizeFile(string $inputFilename, SanitizerOptions $options = null, string $outputFilename = '')
        
                                            
                
            Sanitize a file containing an SVG document.
                    string
                
                
                    sanitizeData(string $data, SanitizerOptions $options = null)
        
                                            
                
            Sanitize a string containing an SVG document.
                    int
                
                
                    getLoadFlags()
        
                                            
                
            Get the flags to be used when loading the XML.
                    dataToXml(string $data)
        
                                            
                
            Create a DOMDocument instance from a string.
                    processNode(DOMElement $element, SanitizerOptions $options)
        
                                            
                
            Analyze an element (and all its children), removing selected elements/attributes.
                    string
                
                
                
            Details
        
                            
    __construct(Filesystem $filesystem)
        
    
    Initialize the instance.
        
                            
    sanitizeFile(string $inputFilename, SanitizerOptions $options = null, string $outputFilename = '')
        
    
    Sanitize a file containing an SVG document.
        
                            string
    sanitizeData(string $data, SanitizerOptions $options = null)
        
    
    Sanitize a string containing an SVG document.
        
                    protected        int
    getLoadFlags()
        
    
    Get the flags to be used when loading the XML.
        
                    protected        DOMDocument
    dataToXml(string $data)
        
    
    Create a DOMDocument instance from a string.
        
                    protected        
    processNode(DOMElement $element, SanitizerOptions $options)
        
    
    Analyze an element (and all its children), removing selected elements/attributes.
        
                    protected        string
    xmlToData(DOMDocument $xml)
        
    
    Render a DOMDocument instance as a string.