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.7.0, 2009-08-10
  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.      * @return PHPExcel_Worksheet_SheetView 
  82.      */
  83.     public function setZoomScale($pValue 100{
  84.         if (($pValue >= 10 && $pValue <= 400|| is_null($pValue)) {
  85.             $this->_zoomScale = $pValue;
  86.         else {
  87.             throw new Exception("Valid scale is between 10 and 400.");
  88.         }
  89.         return $this;
  90.     }
  91.     
  92.     /**
  93.      * Get ZoomScaleNormal
  94.      *
  95.      * @return int 
  96.      */
  97.     public function getZoomScaleNormal({
  98.         return $this->_zoomScaleNormal;
  99.     }
  100.  
  101.     /**
  102.      * Set ZoomScale
  103.      *
  104.      * Valid values range from 10 to 400.
  105.      *
  106.      * @param     int     $pValue 
  107.      * @throws     Exception
  108.      * @return PHPExcel_Worksheet_SheetView 
  109.      */
  110.     public function setZoomScaleNormal($pValue 100{
  111.         if (($pValue >= 10 && $pValue <= 400|| is_null($pValue)) {
  112.             $this->_zoomScaleNormal = $pValue;
  113.         else {
  114.             throw new Exception("Valid scale is between 10 and 400.");
  115.         }
  116.         return $this;
  117.     }
  118.  
  119.     /**
  120.      * Implement PHP __clone to create a deep clone, not just a shallow copy.
  121.      */
  122.     public function __clone({
  123.         $vars get_object_vars($this);
  124.         foreach ($vars as $key => $value{
  125.             if (is_object($value)) {
  126.                 $this->$key clone $value;
  127.             else {
  128.                 $this->$key $value;
  129.             }
  130.         }
  131.     }
  132. }

Documentation generated on Mon, 10 Aug 2009 08:07:48 +0200 by phpDocumentor 1.4.1