Dompdf\Cellmap
Maps table cells to the table grid.
This class resolves borders in tables with collapsed borders and helps
place row & column spanned table cells.
Synopsis
class Cellmap
{
- // members
- protected static array $_BORDER_STYLE_SCORE = ;
- protected Table $_table;
- protected $_num_rows;
- protected $_num_cols;
- protected $_cells;
- protected $_columns;
- protected $_rows;
- protected $_borders;
- protected $_frames;
- private $__col;
- private $__row;
- private bool $_columns_locked = false;
- private bool $_fixed_layout = false;
- // methods
- public void __construct()
- public void reset()
- public void lock_columns()
- public bool is_columns_locked()
- public void set_layout_fixed()
- public bool is_layout_fixed()
- public int get_num_rows()
- public int get_num_cols()
- public array get_columns()
- public void set_columns()
- public mixed get_column()
- public array get_rows()
- public mixed get_row()
- public mixed get_border()
- public array get_border_properties()
- public null|Frame get_spanned_cells()
- public bool frame_exists_in_cellmap()
- public array get_frame_position()
- public int get_frame_width()
- public int get_frame_height()
- public void set_column_width()
- public void set_row_height()
- protected mixed _resolve_border()
- public void add_frame()
- public void add_row()
- public void remove_row()
- public void remove_row_group()
- public void update_row_group()
- public void assign_x_positions()
- public void assign_frame_heights()
- public void set_frame_heights()
- public string __toString()
Members
private
- $__col
—
int
Current column when adding cells, 0-based - $__row
—
int
Current row when adding cells, 0-based - $_columns_locked
—
Dompdf\bool
Tells wether the columns' width can be modified - $_fixed_layout
—
Dompdf\bool
Tells wether the table has table-layout:fixed
protected
- $_BORDER_STYLE_SCORE
—
array
Border style weight lookup for collapsed border resolution. - $_borders
—
array
2D array of border specs - $_cells
—
array
2D array mapping <row,column> to frames - $_columns
—
array
1D array of column dimensions - $_frames
—
array
1D Array mapping frames to (multiple) <row, col> pairs, keyed on frame_id. - $_num_cols
—
int
The total number of columns in the table - $_num_rows
—
int
The total number of rows in the table - $_rows
—
array
1D array of row dimensions - $_table
—
Dompdf\FrameDecorator\Table
The table object this cellmap is attached to.
Methods
protected
public
- __construct()
- __toString() — Used for debugging:
- add_frame()
- add_row()
- assign_frame_heights()
- assign_x_positions()
- frame_exists_in_cellmap()
- get_border()
- get_border_properties()
- get_column()
- get_columns()
- get_frame_height()
- get_frame_position()
- get_frame_width()
- get_num_cols()
- get_num_rows()
- get_row()
- get_rows()
- get_spanned_cells()
- is_columns_locked()
- is_layout_fixed()
- lock_columns()
- remove_row() — Remove a row from the cellmap.
- remove_row_group() — Remove a row group from the cellmap.
- reset()
- set_column_width()
- set_columns()
- set_frame_heights() — Re-adjust frame height if the table height is larger than its content
- set_layout_fixed()
- set_row_height()
- update_row_group() — Update a row group after rows have been removed