CsvSchema
class CsvSchema (View source)
Properties
| protected int | $rowIndex | The row index of the CSV header.  | 
                |
| protected string[] | $headerCells | The header cells.  | 
                |
| protected array | $fieldsMap | The map between the CSV field indexes and the object fields/attributes.  | 
                |
| protected string[] | $missingHeaders | The list of missing headers.  | 
                |
| protected string[] | $unrecognizedHeaders | The list of unrecognized headers.  | 
                
Methods
Initialize the instance.
Get the row index of the CSV header.
Do some of the headers have been recognized?
Get the list of missing headers.
Get the values of the cells associated to the static headers.
Get the values of the cells associated to the attributes.
Get the list of unrecognized headers.
No description
Details
        
                            
    __construct(int $rowIndex, array $headerCells, string[]|Generator $staticHeaders, array $attributesMap)
        
    
    Initialize the instance.
        
                            int
    getRowIndex()
        
    
    Get the row index of the CSV header.
        
                            bool
    someHeaderRecognized()
        
    
    Do some of the headers have been recognized?
        
                            string[]
    getMissingHeaders()
        
    
    Get the list of missing headers.
        
                            array
    getStaticValues(array $cells)
        
    
    Get the values of the cells associated to the static headers.
        
                            array
    getAttributesValues(array $cells)
        
    
    Get the values of the cells associated to the attributes.
        
                            string[]
    getUnrecognizedHeaders()
        
    
    Get the list of unrecognized headers.
        
                        private    
    parseStaticHeaders(string[]|Generator $staticHeaders)
        
    
    No description
        
                        private    
    parseAttributeHeaders(array $attributesMap)
        
    
    No description