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

Source for file PageMargins.php

Documentation is available at PageMargins.php

  1. <?php
  2. /**
  3.  * PHPExcel
  4.  *
  5.  * Copyright (c) 2006 - 2010 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 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
  24.  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  25.  * @version    1.7.3c, 2010-06-01
  26.  */
  27.  
  28.  
  29. /**
  30.  * PHPExcel_Worksheet_PageMargins
  31.  *
  32.  * @category   PHPExcel
  33.  * @package    PHPExcel_Worksheet
  34.  * @copyright  Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
  35.  */
  36. {            
  37.     /**
  38.      * Left
  39.      *
  40.      * @var double 
  41.      */
  42.     private $_left;
  43.     
  44.     /**
  45.      * Right
  46.      *
  47.      * @var double 
  48.      */
  49.     private $_right;
  50.     
  51.     /**
  52.      * Top
  53.      *
  54.      * @var double 
  55.      */
  56.     private $_top;
  57.     
  58.     /**
  59.      * Bottom
  60.      *
  61.      * @var double 
  62.      */
  63.     private $_bottom;
  64.     
  65.     /**
  66.      * Header
  67.      *
  68.      * @var double 
  69.      */
  70.     private $_header;
  71.     
  72.     /**
  73.      * Footer
  74.      *
  75.      * @var double 
  76.      */
  77.     private $_footer;
  78.     
  79.     /**
  80.      * Create a new PHPExcel_Worksheet_PageMargins
  81.      */
  82.     public function __construct()
  83.     {
  84.         // Initialise values
  85.         $this->_left     0.7;
  86.         $this->_right     0.7;
  87.         $this->_top     0.75;
  88.         $this->_bottom     0.75;
  89.         $this->_header     0.3;
  90.         $this->_footer     0.3;
  91.     }
  92.     
  93.     /**
  94.      * Get Left
  95.      *
  96.      * @return double 
  97.      */
  98.     public function getLeft({
  99.         return $this->_left;
  100.     }
  101.     
  102.     /**
  103.      * Set Left
  104.      *
  105.      * @param double $pValue 
  106.      * @return PHPExcel_Worksheet_PageMargins 
  107.      */
  108.     public function setLeft($pValue{
  109.         $this->_left $pValue;
  110.         return $this;
  111.     }
  112.     
  113.     /**
  114.      * Get Right
  115.      *
  116.      * @return double 
  117.      */
  118.     public function getRight({
  119.         return $this->_right;
  120.     }
  121.     
  122.     /**
  123.      * Set Right
  124.      *
  125.      * @param double $pValue 
  126.      * @return PHPExcel_Worksheet_PageMargins 
  127.      */
  128.     public function setRight($pValue{
  129.         $this->_right $pValue;
  130.         return $this;
  131.     }
  132.     
  133.     /**
  134.      * Get Top
  135.      *
  136.      * @return double 
  137.      */
  138.     public function getTop({
  139.         return $this->_top;
  140.     }
  141.     
  142.     /**
  143.      * Set Top
  144.      *
  145.      * @param double $pValue 
  146.      * @return PHPExcel_Worksheet_PageMargins 
  147.      */
  148.     public function setTop($pValue{
  149.         $this->_top $pValue;
  150.         return $this;
  151.     }
  152.     
  153.     /**
  154.      * Get Bottom
  155.      *
  156.      * @return double 
  157.      */
  158.     public function getBottom({
  159.         return $this->_bottom;
  160.     }
  161.     
  162.     /**
  163.      * Set Bottom
  164.      *
  165.      * @param double $pValue 
  166.      * @return PHPExcel_Worksheet_PageMargins 
  167.      */
  168.     public function setBottom($pValue{
  169.         $this->_bottom $pValue;
  170.         return $this;
  171.     }
  172.     
  173.     /**
  174.      * Get Header
  175.      *
  176.      * @return double 
  177.      */
  178.     public function getHeader({
  179.         return $this->_header;
  180.     }
  181.     
  182.     /**
  183.      * Set Header
  184.      *
  185.      * @param double $pValue 
  186.      * @return PHPExcel_Worksheet_PageMargins 
  187.      */
  188.     public function setHeader($pValue{
  189.         $this->_header $pValue;
  190.         return $this;
  191.     }
  192.     
  193.     /**
  194.      * Get Footer
  195.      *
  196.      * @return double 
  197.      */
  198.     public function getFooter({
  199.         return $this->_footer;
  200.     }
  201.     
  202.     /**
  203.      * Set Footer
  204.      *
  205.      * @param double $pValue 
  206.      * @return PHPExcel_Worksheet_PageMargins 
  207.      */
  208.     public function setFooter($pValue{
  209.         $this->_footer $pValue;
  210.         return $this;
  211.     }
  212.         
  213.     /**
  214.      * Implement PHP __clone to create a deep clone, not just a shallow copy.
  215.      */
  216.     public function __clone({
  217.         $vars get_object_vars($this);
  218.         foreach ($vars as $key => $value{
  219.             if (is_object($value)) {
  220.                 $this->$key clone $value;
  221.             else {
  222.                 $this->$key $value;
  223.             }
  224.         }
  225.     }
  226. }

Documentation generated on Tue, 01 Jun 2010 17:05:28 +0200 by phpDocumentor 1.4.3