PHPRtfLite_Table::setBorderForCellRange PHP Méthode

setBorderForCellRange() public méthode

sets border to cells of a given cell range
public setBorderForCellRange ( PHPRtfLite_Border $border, integer $startRow, integer $startColumn, integer $endRow = null, integer $endColumn = null )
$border PHPRtfLite_Border border
$startRow integer start row
$startColumn integer start column
$endRow integer end row, if null, then border is set only to the row range.
$endColumn integer end column, if null, then border is set just to the column range.
    public function setBorderForCellRange(PHPRtfLite_Border $border, $startRow, $startColumn, $endRow = null, $endColumn = null)
    {
        list($startRow, $startColumn, $endRow, $endColumn) = PHPRtfLite_Table::getValidCellRange($startRow, $startColumn, $endRow, $endColumn);
        if ($this->checkIfCellExists($startRow, $startColumn) && $this->checkIfCellExists($endRow, $endColumn)) {
            $cells = $this->getCellsByCellRange($startRow, $startColumn, $endRow, $endColumn);
            foreach ($cells as $cell) {
                $cell->setBorder(clone $border);
            }
        }
    }