PivotCacheDefinition
in package
Read-only representation of a pivot cache definition.
The pivot cache describes where a pivot table's data comes from (the source worksheet and range) and the list of fields available from that source. A single cache can be shared by more than one pivot table.
Tags
Table of Contents
Methods
- __construct() : mixed
- addCacheField() : self
- getCacheFieldName() : string|null
- Return the name of the cache field at the given zero-based index, or null.
- getCacheFields() : array<string|int, string>
- getCacheId() : int|null
- getFieldGroup() : PivotFieldGroup|null
- getSharedItems() : array<string|int, string>
- getSourceRange() : string|null
- getSourceWorksheet() : string|null
- setCacheFields() : self
- setCacheId() : self
- setFieldGroup() : self
- setSharedItems() : self
- Set the distinct values recorded for a field (used when generating a new cache definition).
- setSourceRange() : self
- setSourceWorksheet() : self
Methods
__construct()
public
__construct([int|null $cacheId = null ]) : mixed
Parameters
- $cacheId : int|null = null
addCacheField()
public
addCacheField(string $name) : self
Parameters
- $name : string
Return values
selfgetCacheFieldName()
Return the name of the cache field at the given zero-based index, or null.
public
getCacheFieldName(int $index) : string|null
Parameters
- $index : int
Return values
string|nullgetCacheFields()
public
getCacheFields() : array<string|int, string>
Return values
array<string|int, string>getCacheId()
public
getCacheId() : int|null
Return values
int|nullgetFieldGroup()
public
getFieldGroup(string $fieldName) : PivotFieldGroup|null
Parameters
- $fieldName : string
Return values
PivotFieldGroup|nullgetSharedItems()
public
getSharedItems(string $fieldName) : array<string|int, string>
Parameters
- $fieldName : string
Return values
array<string|int, string>getSourceRange()
public
getSourceRange() : string|null
Return values
string|nullgetSourceWorksheet()
public
getSourceWorksheet() : string|null
Return values
string|nullsetCacheFields()
public
setCacheFields(array<string|int, string> $cacheFields) : self
Parameters
- $cacheFields : array<string|int, string>
Return values
selfsetCacheId()
public
setCacheId(int|null $cacheId) : self
Parameters
- $cacheId : int|null
Return values
selfsetFieldGroup()
public
setFieldGroup(string $fieldName, PivotFieldGroup $group) : self
Parameters
- $fieldName : string
- $group : PivotFieldGroup
Return values
selfsetSharedItems()
Set the distinct values recorded for a field (used when generating a new cache definition).
public
setSharedItems(string $fieldName, array<string|int, string> $items) : self
Parameters
- $fieldName : string
- $items : array<string|int, string>
Return values
selfsetSourceRange()
public
setSourceRange(string|null $sourceRange) : self
Parameters
- $sourceRange : string|null
Return values
selfsetSourceWorksheet()
public
setSourceWorksheet(string|null $sourceWorksheet) : self
Parameters
- $sourceWorksheet : string|null