SitemapWriter
class SitemapWriter (View source)
Constants
| EVENTNAME_ELEMENTREADY | 
                     Name of the event called when a page is going to be added to the sitemap.  | 
            
| EVENTNAME_PAGEREADY_DEPRECATED | 
                     Name of the deprecated event called when a page is going to be added to the sitemap.  | 
            
| EVENTNAME_XMLREADY | 
                     Name of the event called when the whole XML is ready.  | 
            
| MODE_AUTO | 
                     Write mode: automatic (MODE_HIGHMEMORY if the on_sitemap_xml_addingpage/on_sitemap_xml_ready events are hooked, MODE_LOWMEMORY otherwise).  | 
            
| MODE_LOWMEMORY | 
                     Write mode: use less memory (the on_sitemap_xml_addingpage/on_sitemap_xml_ready events won't be fired).  | 
            
| MODE_HIGHMEMORY | 
                     Write mode: use more memory (the on_sitemap_xml_addingpage/on_sitemap_xml_ready event will be called).  | 
            
Properties
| protected Application | $app | ||
| protected Filesystem | $filesystem | ||
| protected int | $mode | The write mode.  | 
                |
| protected EventDispatcher | $director | ||
| protected string | $indenter | ||
| protected string | $lineTerminator | ||
| private SitemapGenerator|null | $sitemapGenerator | ||
| private string | $outputFilename | ||
| private string | $temporaryDirectory | 
Methods
Get the write mode.
Set the write mode.
Get the string used to indent the XML when the mode is set to MODE_LOWMEMORY.
Set the string used to indent the XML when the mode is set to MODE_LOWMEMORY.
Get the string used as new-line terminator in the XML when the mode is set to MODE_LOWMEMORY.
Get the string used as new-line terminator in the XML when the mode is set to MODE_LOWMEMORY.
Get the SitemapGenerator instance to be used.
Set the SitemapGenerator instance to be used.
Set the path to the sitemap to be generated.
Get the path to the sitemap to be generated.
Get the URL of the sitemap corresponding to the output file name.
Generate the sitemap.
Get the temporary directory to be used during the sitemap generation.
No description
Details
        
                            
    __construct(Application $app, Filesystem $filesystem, EventDispatcher $director)
        
    
    No description
        
                            int
    getMode()
        
    
    Get the write mode.
        
                            $this
    setMode(int $mode)
        
    
    Set the write mode.
        
                            string
    getIndenter()
        
    
    Get the string used to indent the XML when the mode is set to MODE_LOWMEMORY.
        
                            $this
    setIndenter(string $indenter)
        
    
    Set the string used to indent the XML when the mode is set to MODE_LOWMEMORY.
        
                            string
    getLineTerminator()
        
    
    Get the string used as new-line terminator in the XML when the mode is set to MODE_LOWMEMORY.
        
                            $this
    setLineTerminator(string $lineTerminator)
        
    
    Get the string used as new-line terminator in the XML when the mode is set to MODE_LOWMEMORY.
        
                            SitemapGenerator
    getSitemapGenerator()
        
    
    Get the SitemapGenerator instance to be used.
        
                            $this
    setSitemapGenerator(SitemapGenerator $sitemapGenerator)
        
    
    Set the SitemapGenerator instance to be used.
        
                            $this
    setOutputFilename(string $outputFilename)
        
    
    Set the path to the sitemap to be generated.
        
                            string
    getOutputFilename()
        
    
    Get the path to the sitemap to be generated.
        
                            string
    getSitemapUrl()
        
    
    Get the URL of the sitemap corresponding to the output file name.
        
                            
    generate(callable $pulse = null)
        
    
    Generate the sitemap.
        
                    protected        string
    getTemporaryDirectory()
        
    
    Get the temporary directory to be used during the sitemap generation.
        
                    protected        
    checkOutputFilename(string $outputFilename)
        
    
    No description