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

Source for file SheetView.php

Documentation is available at SheetView.php

  1. <?php
  2. /**
  3.  * PHPExcel
  4.  *
  5.  * Copyright (c) 2006 - 2009 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 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)
  24.  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  25.  * @version    1.6.5, 2009-01-05
  26.  */
  27.  
  28.  
  29. /**
  30.  * PHPExcel_Worksheet_SheetView
  31.  *
  32.  * @category   PHPExcel
  33.  * @package    PHPExcel_Worksheet
  34.  * @copyright  Copyright (c) 2006 - 2009 PHPExcel (http://www.codeplex.com/PHPExcel)
  35.  */
  36. {
  37.     /**
  38.      * ZoomScale
  39.      * 
  40.      * Valid values range from 10 to 400.
  41.      *
  42.      * @var int 
  43.      */
  44.     private $_zoomScale;
  45.  
  46.     /**
  47.      * ZoomScaleNormal
  48.      * 
  49.      * Valid values range from 10 to 400.
  50.      *
  51.      * @var int 
  52.      */
  53.     private $_zoomScaleNormal;
  54.  
  55.     /**
  56.      * Create a new PHPExcel_Worksheet_SheetView
  57.      */
  58.     public function __construct()
  59.     {
  60.         // Initialise values
  61.         $this->_zoomScale                 = 100;
  62.         $this->_zoomScaleNormal         = 100;
  63.     }
  64.  
  65.     /**
  66.      * Get ZoomScale
  67.      *
  68.      * @return int 
  69.      */
  70.     public function getZoomScale({
  71.         return $this->_zoomScale;
  72.     }
  73.  
  74.     /**
  75.      * Set ZoomScale
  76.      *
  77.      * Valid values range from 10 to 400.
  78.      *
  79.      * @param     int     $pValue 
  80.      * @throws     Exception
  81.      */
  82.     public function setZoomScale($pValue 100{
  83.         if (($pValue >= 10 && $pValue <= 400|| is_null($pValue)) {
  84.             $this->_zoomScale = $pValue;
  85.         else {
  86.             throw new Exception("Valid scale is between 10 and 400.");
  87.         }
  88.     }
  89.     
  90.     /**
  91.      * Get ZoomScaleNormal
  92.      *
  93.      * @return int 
  94.      */
  95.     public function getZoomScaleNormal({
  96.         return $this->_zoomScaleNormal;
  97.     }
  98.  
  99.     /**
  100.      * Set ZoomScale
  101.      *
  102.      * Valid values range from 10 to 400.
  103.      *
  104.      * @param     int     $pValue 
  105.      * @throws     Exception
  106.      */
  107.     public function setZoomScaleNormal($pValue 100{
  108.         if (($pValue >= 10 && $pValue <= 400|| is_null($pValue)) {
  109.             $this->_zoomScaleNormal = $pValue;
  110.         else {
  111.             throw new Exception("Valid scale is between 10 and 400.");
  112.         }
  113.     }
  114.  
  115.     /**
  116.      * Implement PHP __clone to create a deep clone, not just a shallow copy.
  117.      */
  118.     public function __clone({
  119.         $vars get_object_vars($this);
  120.         foreach ($vars as $key => $value{
  121.             if (is_object($value)) {
  122.                 $this->$key clone $value;
  123.             else {
  124.                 $this->$key $value;
  125.             }
  126.         }
  127.     }
  128. }

Documentation generated on Mon, 05 Jan 2009 20:38:29 +0100 by phpDocumentor 1.4.1