PivotTable
in package
implements
Stringable
Read-only representation of a pivot table.
This models the metadata of a pivot table that already exists in a loaded spreadsheet: its name, where it is placed on the sheet, the cache it draws its data from, and the fields on each axis. It does not (yet) recalculate or render the pivot, and it does not modify the underlying file - existing pivot tables are still written back verbatim from the preserved source XML.
Tags
Table of Contents
Interfaces
- Stringable
Methods
- __construct() : mixed
- __destruct() : mixed
- Code to execute when this pivot table is unset().
- __toString() : string
- addField() : self
- getCacheDefinition() : PivotCacheDefinition|null
- getColumnFields() : array<string|int, PivotField>
- Return only the fields placed on the column axis, in order.
- getDataFields() : array<string|int, PivotField>
- Return only the value/data fields, in order.
- getFields() : array<string|int, PivotField>
- getLocation() : string
- getName() : string
- getPageFields() : array<string|int, PivotField>
- Return only the fields placed on the page/filter axis, in order.
- getRowFields() : array<string|int, PivotField>
- Return only the fields placed on the row axis, in order.
- getWorksheet() : Worksheet|null
- isGenerated() : bool
- setCacheDefinition() : self
- setGenerated() : self
- setLocation() : self
- setName() : self
- setWorksheet() : self
Methods
__construct()
public
__construct([string $name = '' ]) : mixed
Parameters
- $name : string = ''
__destruct()
Code to execute when this pivot table is unset().
public
__destruct() : mixed
__toString()
public
__toString() : string
Return values
stringaddField()
public
addField(PivotField $field) : self
Parameters
- $field : PivotField
Return values
selfgetCacheDefinition()
public
getCacheDefinition() : PivotCacheDefinition|null
Return values
PivotCacheDefinition|nullgetColumnFields()
Return only the fields placed on the column axis, in order.
public
getColumnFields() : array<string|int, PivotField>
Return values
array<string|int, PivotField>getDataFields()
Return only the value/data fields, in order.
public
getDataFields() : array<string|int, PivotField>
Return values
array<string|int, PivotField>getFields()
public
getFields() : array<string|int, PivotField>
Return values
array<string|int, PivotField>getLocation()
public
getLocation() : string
Return values
stringgetName()
public
getName() : string
Return values
stringgetPageFields()
Return only the fields placed on the page/filter axis, in order.
public
getPageFields() : array<string|int, PivotField>
Return values
array<string|int, PivotField>getRowFields()
Return only the fields placed on the row axis, in order.
public
getRowFields() : array<string|int, PivotField>
Return values
array<string|int, PivotField>getWorksheet()
public
getWorksheet() : Worksheet|null
Return values
Worksheet|nullisGenerated()
public
isGenerated() : bool
Return values
boolsetCacheDefinition()
public
setCacheDefinition(PivotCacheDefinition|null $cacheDefinition) : self
Parameters
- $cacheDefinition : PivotCacheDefinition|null
Return values
selfsetGenerated()
public
setGenerated(bool $generated) : self
Parameters
- $generated : bool
Return values
selfsetLocation()
public
setLocation(string $location) : self
Parameters
- $location : string
Return values
selfsetName()
public
setName(string $name) : self
Parameters
- $name : string
Return values
selfsetWorksheet()
public
setWorksheet(Worksheet|null $worksheet) : self
Parameters
- $worksheet : Worksheet|null