AbstractExporter
abstract class AbstractExporter (View source)
Properties
| private Writer | $writer | The CSV Writer instance.  | 
                |
| private CategoryInterface|null | $category | The attribute category.  | 
                |
| private array|null | $attributeKeysAndControllers | The memoized attribute keys and controllers for the attribute category.  | 
                |
| private int | $unloadDoctrineEveryTick | Unload doctrine entities every X ticks (0 for never).  | 
                |
| private int|null | $ticksUntilUnload | Remaining ticks before unloading Doctrine entities.  | 
                
Methods
Set the number of ticks after which doctrine entities should be unloaded (0 for never).
Get the number of ticks after which doctrine entities should be unloaded (0 for never).
Add a tick (to be used to unload Doctrine entities).
Insert the header row.
Get the list of fixed headers.
Override this method if the item returned by an ItemList is not already an ObjectInterface instance.
Set the CSV Writer instance.
Get the CSV Writer instance.
Get the attribute category to be used to export the data.
A generator that returns all headers.
Get a list the attribute keys and controllers for the current category.
Unload every Doctrine entites, and reset the state of this instance.
Details
        
                    protected        
    __construct(Writer $writer, CategoryInterface $category = null)
        
    
    Initialize the instance.
        
                            $this
    setUnloadDoctrineEveryTick(int $value)
        
    
    Set the number of ticks after which doctrine entities should be unloaded (0 for never).
        
                            int
    getUnloadDoctrineEveryTick()
        
    
    Get the number of ticks after which doctrine entities should be unloaded (0 for never).
        
                            $this
    tick()
        
    
    Add a tick (to be used to unload Doctrine entities).
        
                            $this
    insertHeaders()
        
    
    Insert the header row.
        
                            $this
    insertObject(ObjectInterface $object)
        
    
    Insert a row for a specific object instance.
        
                            $this
    insertList(ItemList $list)
        
    
    Insert one row for every object in a database list.
        
            abstract        protected        string[]|Generator
    getStaticHeaders()
        
    
    Get the list of fixed headers.
        
            abstract        protected        string[]|Generator
    getStaticFieldValues(ObjectInterface $object)
        
    
    Get the list of fixed values of an object instance.
        
                    protected        ObjectInterface
    getObjectFromListResult(ItemList $list, mixed $listResult)
        
    
    Override this method if the item returned by an ItemList is not already an ObjectInterface instance.
        
                    protected        $this
    setWriter(Writer $writer)
        
    
    Set the CSV Writer instance.
        
                    protected        Writer
    getWriter()
        
    
    Get the CSV Writer instance.
        
                    protected        $this
    setCategory(CategoryInterface $category)
        
    
    Set the attribute category to be used to export the data.
        
                    protected        CategoryInterface|null
    getCategory()
        
    
    Get the attribute category to be used to export the data.
        
                    protected        string[]|Generator
    projectHeaders()
        
    
    A generator that returns all headers.
        
                    protected        string[]|Generator
    projectObject(ObjectInterface $object)
        
    
    A generator that returns all fields of an object instance.
        
                    protected        string[][]|Generator
    projectList(ItemList $list)
        
    
    A generator that returns all the rows for an object list.
        
                    protected        array
    getAttributeKeysAndControllers()
        
    
    Get a list the attribute keys and controllers for the current category.
        
                    protected        
    unloadDoctrineEntities()
        
    
    Unload every Doctrine entites, and reset the state of this instance.