[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/phpexcel/PHPExcel/Worksheet/ -> ColumnDimension.php (source)

   1  <?php
   2  
   3  /**
   4   * PHPExcel_Worksheet_ColumnDimension
   5   *
   6   * Copyright (c) 2006 - 2015 PHPExcel
   7   *
   8   * This library is free software; you can redistribute it and/or
   9   * modify it under the terms of the GNU Lesser General Public
  10   * License as published by the Free Software Foundation; either
  11   * version 2.1 of the License, or (at your option) any later version.
  12   *
  13   * This library is distributed in the hope that it will be useful,
  14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16   * Lesser General Public License for more details.
  17   *
  18   * You should have received a copy of the GNU Lesser General Public
  19   * License along with this library; if not, write to the Free Software
  20   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  21   *
  22   * @category   PHPExcel
  23   * @package    PHPExcel_Worksheet
  24   * @copyright  Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
  25   * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  26   * @version    ##VERSION##, ##DATE##
  27   */
  28  class PHPExcel_Worksheet_ColumnDimension extends PHPExcel_Worksheet_Dimension
  29  {
  30      /**
  31       * Column index
  32       *
  33       * @var int
  34       */
  35      private $columnIndex;
  36  
  37      /**
  38       * Column width
  39       *
  40       * When this is set to a negative value, the column width should be ignored by IWriter
  41       *
  42       * @var double
  43       */
  44      private $width = -1;
  45  
  46      /**
  47       * Auto size?
  48       *
  49       * @var bool
  50       */
  51      private $autoSize = false;
  52  
  53      /**
  54       * Create a new PHPExcel_Worksheet_ColumnDimension
  55       *
  56       * @param string $pIndex Character column index
  57       */
  58      public function __construct($pIndex = 'A')
  59      {
  60          // Initialise values
  61          $this->columnIndex = $pIndex;
  62  
  63          // set dimension as unformatted by default
  64          parent::__construct(0);
  65      }
  66  
  67      /**
  68       * Get ColumnIndex
  69       *
  70       * @return string
  71       */
  72      public function getColumnIndex()
  73      {
  74          return $this->columnIndex;
  75      }
  76  
  77      /**
  78       * Set ColumnIndex
  79       *
  80       * @param string $pValue
  81       * @return PHPExcel_Worksheet_ColumnDimension
  82       */
  83      public function setColumnIndex($pValue)
  84      {
  85          $this->columnIndex = $pValue;
  86          return $this;
  87      }
  88  
  89      /**
  90       * Get Width
  91       *
  92       * @return double
  93       */
  94      public function getWidth()
  95      {
  96          return $this->width;
  97      }
  98  
  99      /**
 100       * Set Width
 101       *
 102       * @param double $pValue
 103       * @return PHPExcel_Worksheet_ColumnDimension
 104       */
 105      public function setWidth($pValue = -1)
 106      {
 107          $this->width = $pValue;
 108          return $this;
 109      }
 110  
 111      /**
 112       * Get Auto Size
 113       *
 114       * @return bool
 115       */
 116      public function getAutoSize()
 117      {
 118          return $this->autoSize;
 119      }
 120  
 121      /**
 122       * Set Auto Size
 123       *
 124       * @param bool $pValue
 125       * @return PHPExcel_Worksheet_ColumnDimension
 126       */
 127      public function setAutoSize($pValue = false)
 128      {
 129          $this->autoSize = $pValue;
 130          return $this;
 131      }
 132  }


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1