StructuredReference
in package
implements
Operand, Stringable
FinalYes
Table of Contents
Interfaces
- Operand
- Stringable
Constants
- NAME = 'Structured Reference'
- CLOSE_BRACE = ']'
- ITEM_SPECIFIER_ALL = '#All'
- ITEM_SPECIFIER_DATA = '#Data'
- ITEM_SPECIFIER_HEADERS = '#Headers'
- ITEM_SPECIFIER_ROWS_SET = [self::ITEM_SPECIFIER_ALL, self::ITEM_SPECIFIER_HEADERS, self::ITEM_SPECIFIER_DATA, self::ITEM_SPECIFIER_TOTALS]
- ITEM_SPECIFIER_THIS_ROW = '#This Row'
- ITEM_SPECIFIER_TOTALS = '#Totals'
- OPEN_BRACE = '['
- TABLE_REFERENCE = '/([\p{L}_\\\\][\p{L}\p{N}\._]+)?(\[(?:[^\]\[]+|(?R))*+\])/miu'
Properties
- $columns : array<string|int, mixed>
- $firstDataRow : int
- $headersRow : int|null
- $lastDataRow : int
- $reference : string
- $table : Table
- $tableName : string
- $totalsRow : int|null
- $value : string
Methods
- __construct() : mixed
- __toString() : string
- fromParser() : self
- parse() : string
- value() : string
- adjustRowReference() : string
- fullData() : string
- getColumnReference() : string
- getColumns() : array<string|int, mixed>
- getColumnsForColumnReference() : string
- getMaximumRow() : int
- getMinimumRow() : int
- getRowReference() : string
- getRowsForColumnReference() : array<int, int>
- getTableByName() : Table
- getTableForCell() : Table
- getTableStructure() : void
- isRowReference() : bool
- validateParsedReference() : string
Constants
NAME
public
mixed
NAME
= 'Structured Reference'
CLOSE_BRACE
private
mixed
CLOSE_BRACE
= ']'
ITEM_SPECIFIER_ALL
private
mixed
ITEM_SPECIFIER_ALL
= '#All'
ITEM_SPECIFIER_DATA
private
mixed
ITEM_SPECIFIER_DATA
= '#Data'
ITEM_SPECIFIER_HEADERS
private
mixed
ITEM_SPECIFIER_HEADERS
= '#Headers'
ITEM_SPECIFIER_ROWS_SET
private
mixed
ITEM_SPECIFIER_ROWS_SET
= [self::ITEM_SPECIFIER_ALL, self::ITEM_SPECIFIER_HEADERS, self::ITEM_SPECIFIER_DATA, self::ITEM_SPECIFIER_TOTALS]
ITEM_SPECIFIER_THIS_ROW
private
mixed
ITEM_SPECIFIER_THIS_ROW
= '#This Row'
ITEM_SPECIFIER_TOTALS
private
mixed
ITEM_SPECIFIER_TOTALS
= '#Totals'
OPEN_BRACE
private
mixed
OPEN_BRACE
= '['
TABLE_REFERENCE
private
mixed
TABLE_REFERENCE
= '/([\p{L}_\\\\][\p{L}\p{N}\._]+)?(\[(?:[^\]\[]+|(?R))*+\])/miu'
Properties
$columns
private
array<string|int, mixed>
$columns
$firstDataRow
private
int
$firstDataRow
$headersRow
private
int|null
$headersRow
$lastDataRow
private
int
$lastDataRow
$reference
private
string
$reference
$table
private
Table
$table
$tableName
private
string
$tableName
$totalsRow
private
int|null
$totalsRow
$value
private
string
$value
Methods
__construct()
public
__construct(string $structuredReference) : mixed
Parameters
- $structuredReference : string
__toString()
public
__toString() : string
Return values
stringfromParser()
public
static fromParser(string $formula, int $index, array<string|int, mixed> $matches) : self
Parameters
- $formula : string
- $index : int
- $matches : array<string|int, mixed>
Return values
selfparse()
public
parse(Cell $cell) : string
Parameters
- $cell : Cell
Tags
Return values
stringvalue()
public
value() : string
Return values
stringadjustRowReference()
private
adjustRowReference(string $columnName, string $reference, Cell $cell, string $columnId) : string
Parameters
- $columnName : string
- $reference : string
- $cell : Cell
- $columnId : string
Return values
stringfullData()
private
fullData(int $startRow, int $endRow) : string
Parameters
- $startRow : int
- $endRow : int
Return values
stringgetColumnReference()
private
getColumnReference() : string
Tags
Return values
stringgetColumns()
private
getColumns(Cell $cell, array<string|int, mixed> $tableRange) : array<string|int, mixed>
Parameters
- $cell : Cell
- $tableRange : array<string|int, mixed>
Return values
array<string|int, mixed>getColumnsForColumnReference()
private
getColumnsForColumnReference(string $reference, int $startRow, int $endRow) : string
Parameters
- $reference : string
- $startRow : int
- $endRow : int
Return values
stringgetMaximumRow()
private
getMaximumRow(string $reference) : int
Parameters
- $reference : string
Return values
intgetMinimumRow()
private
getMinimumRow(string $reference) : int
Parameters
- $reference : string
Return values
intgetRowReference()
private
getRowReference(Cell $cell) : string
Parameters
- $cell : Cell
Return values
stringgetRowsForColumnReference()
private
getRowsForColumnReference(string &$reference, int $startRow, int $endRow) : array<int, int>
Parameters
- $reference : string
- $startRow : int
- $endRow : int
Return values
array<int, int>getTableByName()
private
getTableByName(Cell $cell) : Table
Parameters
- $cell : Cell
Tags
Return values
TablegetTableForCell()
private
getTableForCell(Cell $cell) : Table
Parameters
- $cell : Cell
Tags
Return values
TablegetTableStructure()
private
getTableStructure(Cell $cell) : void
Parameters
- $cell : Cell
Tags
isRowReference()
private
isRowReference() : bool
Return values
boolvalidateParsedReference()
private
validateParsedReference(string $reference) : string
Parameters
- $reference : string