PHPExcel_Worksheet
[ class tree: PHPExcel_Worksheet ] [ index: PHPExcel_Worksheet ] [ all elements ]

Source for file RowDimension.php

Documentation is available at RowDimension.php

  1. <?php
  2. /**
  3.  * PHPExcel
  4.  *
  5.  * Copyright (c) 2006 - 2011 PHPExcel
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2.1 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the Free Software
  19.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  20.  *
  21.  * @category   PHPExcel
  22.  * @package    PHPExcel_Worksheet
  23.  * @copyright  Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
  24.  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  25.  * @version    1.7.6, 2011-02-27
  26.  */
  27.  
  28.  
  29. /**
  30.  * PHPExcel_Worksheet_RowDimension
  31.  *
  32.  * @category   PHPExcel
  33.  * @package    PHPExcel_Worksheet
  34.  * @copyright  Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
  35.  */
  36. {
  37.     /**
  38.      * Row index
  39.      *
  40.      * @var int 
  41.      */
  42.     private $_rowIndex;
  43.  
  44.     /**
  45.      * Row height (in pt)
  46.      *
  47.      * When this is set to a negative value, the row height should be ignored by IWriter
  48.      *
  49.      * @var double 
  50.      */
  51.     private $_rowHeight        = -1;
  52.  
  53.     /**
  54.      * Visible?
  55.      *
  56.      * @var bool 
  57.      */
  58.     private $_visible        true;
  59.  
  60.     /**
  61.      * Outline level
  62.      *
  63.      * @var int 
  64.      */
  65.     private $_outlineLevel    0;
  66.  
  67.     /**
  68.      * Collapsed
  69.      *
  70.      * @var bool 
  71.      */
  72.     private $_collapsed        false;
  73.  
  74.     /**
  75.      * Index to cellXf. Null value means row has no explicit cellXf format.
  76.      *
  77.      * @var int|null
  78.      */
  79.     private $_xfIndex;
  80.  
  81.     /**
  82.      * Create a new PHPExcel_Worksheet_RowDimension
  83.      *
  84.      * @param int $pIndex Numeric row index
  85.      */
  86.     public function __construct($pIndex 0)
  87.     {
  88.         // Initialise values
  89.         $this->_rowIndex        $pIndex;
  90.  
  91.         // set row dimension as unformatted by default
  92.         $this->_xfIndex null;
  93.     }
  94.  
  95.     /**
  96.      * Get Row Index
  97.      *
  98.      * @return int 
  99.      */
  100.     public function getRowIndex({
  101.         return $this->_rowIndex;
  102.     }
  103.  
  104.     /**
  105.      * Set Row Index
  106.      *
  107.      * @param int $pValue 
  108.      * @return PHPExcel_Worksheet_RowDimension 
  109.      */
  110.     public function setRowIndex($pValue{
  111.         $this->_rowIndex $pValue;
  112.         return $this;
  113.     }
  114.  
  115.     /**
  116.      * Get Row Height
  117.      *
  118.      * @return double 
  119.      */
  120.     public function getRowHeight({
  121.         return $this->_rowHeight;
  122.     }
  123.  
  124.     /**
  125.      * Set Row Height
  126.      *
  127.      * @param double $pValue 
  128.      * @return PHPExcel_Worksheet_RowDimension 
  129.      */
  130.     public function setRowHeight($pValue = -1{
  131.         $this->_rowHeight $pValue;
  132.         return $this;
  133.     }
  134.  
  135.     /**
  136.      * Get Visible
  137.      *
  138.      * @return bool 
  139.      */
  140.     public function getVisible({
  141.         return $this->_visible;
  142.     }
  143.  
  144.     /**
  145.      * Set Visible
  146.      *
  147.      * @param bool $pValue 
  148.      * @return PHPExcel_Worksheet_RowDimension 
  149.      */
  150.     public function setVisible($pValue true{
  151.         $this->_visible $pValue;
  152.         return $this;
  153.     }
  154.  
  155.     /**
  156.      * Get Outline Level
  157.      *
  158.      * @return int 
  159.      */
  160.     public function getOutlineLevel({
  161.         return $this->_outlineLevel;
  162.     }
  163.  
  164.     /**
  165.      * Set Outline Level
  166.      *
  167.      * Value must be between 0 and 7
  168.      *
  169.      * @param int $pValue 
  170.      * @throws Exception
  171.      * @return PHPExcel_Worksheet_RowDimension 
  172.      */
  173.     public function setOutlineLevel($pValue{
  174.         if ($pValue || $pValue 7{
  175.             throw new Exception("Outline level must range between 0 and 7.");
  176.         }
  177.  
  178.         $this->_outlineLevel $pValue;
  179.         return $this;
  180.     }
  181.  
  182.     /**
  183.      * Get Collapsed
  184.      *
  185.      * @return bool 
  186.      */
  187.     public function getCollapsed({
  188.         return $this->_collapsed;
  189.     }
  190.  
  191.     /**
  192.      * Set Collapsed
  193.      *
  194.      * @param bool $pValue 
  195.      * @return PHPExcel_Worksheet_RowDimension 
  196.      */
  197.     public function setCollapsed($pValue true{
  198.         $this->_collapsed $pValue;
  199.         return $this;
  200.     }
  201.  
  202.     /**
  203.      * Get index to cellXf
  204.      *
  205.      * @return int 
  206.      */
  207.     public function getXfIndex()
  208.     {
  209.         return $this->_xfIndex;
  210.     }
  211.  
  212.     /**
  213.      * Set index to cellXf
  214.      *
  215.      * @param int $pValue 
  216.      * @return PHPExcel_Worksheet_RowDimension 
  217.      */
  218.     public function setXfIndex($pValue 0)
  219.     {
  220.         $this->_xfIndex $pValue;
  221.         return $this;
  222.     }
  223.  
  224.     /**
  225.      * Implement PHP __clone to create a deep clone, not just a shallow copy.
  226.      */
  227.     public function __clone({
  228.         $vars get_object_vars($this);
  229.         foreach ($vars as $key => $value{
  230.             if (is_object($value)) {
  231.                 $this->$key clone $value;
  232.             else {
  233.                 $this->$key $value;
  234.             }
  235.         }
  236.     }
  237. }

Documentation generated on Sun, 27 Feb 2011 16:33:48 -0800 by phpDocumentor 1.4.3