rotateCellRange() public method

rotates cells of a given cell range
public rotateCellRange ( string $rotateTo, integer $startRow, integer $startColumn, integer $endRow = null, integer $endColumn = null )
$rotateTo string direction of rotation
Possible values (represented by PHPRtfLite_Table_Cell::ROTATE_*):
PHPRtfLite_Table_Cell::ROTATE_RIGHT => 'right'
PHPRtfLite_Table_Cell::ROTATE_LEFT => 'left'
$startRow integer start row
$startColumn integer start column
$endRow integer end row, if null, then rotation is set only to the row range.
$endColumn integer end column, if null, then rotation is set just to the column range.
コード例 #1
0
ファイル: TableTest.php プロジェクト: jfrank1500/curso_php
 /**
  * tests rotateCellRange
  */
 public function testRotateCellRange()
 {
     $rotateTo = PHPRtfLite_Table_Cell::ROTATE_RIGHT;
     $this->_table->addRows(3);
     $this->_table->addColumnsList(array(5, 5, 5));
     $this->_table->rotateCellRange($rotateTo, 2, 2, 3, 3);
     for ($rowIndex = 2; $rowIndex < 4; $rowIndex++) {
         for ($columnIndex = 2; $columnIndex < 4; $columnIndex++) {
             $cell = $this->_table->getCell($rowIndex, $columnIndex);
             $this->assertEquals($rotateTo, $cell->getRotateTo());
         }
     }
 }