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

Source for file DocumentProperties.php

Documentation is available at DocumentProperties.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
  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_DocumentProperties
  31.  *
  32.  * @category   PHPExcel
  33.  * @package    PHPExcel
  34.  * @copyright  Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
  35.  */
  36. {
  37.     /**
  38.      * Creator
  39.      *
  40.      * @var string 
  41.      */
  42.     private $_creator;
  43.     
  44.     /**
  45.      * LastModifiedBy
  46.      *
  47.      * @var string 
  48.      */
  49.     private $_lastModifiedBy;
  50.     
  51.     /**
  52.      * Created
  53.      *
  54.      * @var datetime 
  55.      */
  56.     private $_created;
  57.     
  58.     /**
  59.      * Modified
  60.      *
  61.      * @var datetime 
  62.      */
  63.     private $_modified;
  64.     
  65.     /**
  66.      * Title
  67.      *
  68.      * @var string 
  69.      */
  70.     private $_title;
  71.     
  72.     /**
  73.      * Description
  74.      *
  75.      * @var string 
  76.      */
  77.     private $_description;
  78.     
  79.     /**
  80.      * Subject
  81.      *
  82.      * @var string 
  83.      */
  84.     private $_subject;
  85.     
  86.     /**
  87.      * Keywords
  88.      *
  89.      * @var string 
  90.      */
  91.     private $_keywords;
  92.     
  93.     /**
  94.      * Category
  95.      *
  96.      * @var string 
  97.      */
  98.     private $_category;
  99.     
  100.     /**
  101.      * Company
  102.      * 
  103.      * @var string 
  104.      */
  105.     private $_company;
  106.     
  107.     /**
  108.      * Create a new PHPExcel_DocumentProperties
  109.      */
  110.     public function __construct()
  111.     {
  112.         // Initialise values
  113.         $this->_creator         'Unknown Creator';
  114.         $this->_lastModifiedBy     $this->_creator;
  115.         $this->_created         time();
  116.         $this->_modified         time();
  117.         $this->_title            "Untitled Spreadsheet";
  118.         $this->_subject            '';
  119.         $this->_description        '';
  120.         $this->_keywords        '';
  121.         $this->_category        '';
  122.         $this->_company         'Microsoft Corporation';
  123.     }
  124.     
  125.     /**
  126.      * Get Creator
  127.      *
  128.      * @return string 
  129.      */
  130.     public function getCreator({
  131.         return $this->_creator;
  132.     }
  133.     
  134.     /**
  135.      * Set Creator
  136.      *
  137.      * @param string $pValue 
  138.      * @return PHPExcel_DocumentProperties 
  139.      */
  140.     public function setCreator($pValue ''{
  141.         $this->_creator $pValue;
  142.         return $this;
  143.     }
  144.     
  145.     /**
  146.      * Get Last Modified By
  147.      *
  148.      * @return string 
  149.      */
  150.     public function getLastModifiedBy({
  151.         return $this->_lastModifiedBy;
  152.     }
  153.     
  154.     /**
  155.      * Set Last Modified By
  156.      *
  157.      * @param string $pValue 
  158.      * @return PHPExcel_DocumentProperties 
  159.      */
  160.     public function setLastModifiedBy($pValue ''{
  161.         $this->_lastModifiedBy $pValue;
  162.         return $this;
  163.     }
  164.     
  165.     /**
  166.      * Get Created
  167.      *
  168.      * @return datetime 
  169.      */
  170.     public function getCreated({
  171.         return $this->_created;
  172.     }
  173.     
  174.     /**
  175.      * Set Created
  176.      *
  177.      * @param datetime $pValue 
  178.      * @return PHPExcel_DocumentProperties 
  179.      */
  180.     public function setCreated($pValue null{
  181.         if (is_null($pValue)) {
  182.             $pValue time();
  183.         }
  184.         $this->_created $pValue;
  185.         return $this;
  186.     }
  187.     
  188.     /**
  189.      * Get Modified
  190.      *
  191.      * @return datetime 
  192.      */
  193.     public function getModified({
  194.         return $this->_modified;
  195.     }
  196.     
  197.     /**
  198.      * Set Modified
  199.      *
  200.      * @param datetime $pValue 
  201.      * @return PHPExcel_DocumentProperties 
  202.      */
  203.     public function setModified($pValue null{
  204.         if (is_null($pValue)) {
  205.             $pValue time();
  206.         }
  207.         $this->_modified $pValue;
  208.         return $this;
  209.     }
  210.     
  211.     /**
  212.      * Get Title
  213.      *
  214.      * @return string 
  215.      */
  216.     public function getTitle({
  217.         return $this->_title;
  218.     }
  219.     
  220.     /**
  221.      * Set Title
  222.      *
  223.      * @param string $pValue 
  224.      * @return PHPExcel_DocumentProperties 
  225.      */
  226.     public function setTitle($pValue ''{
  227.         $this->_title $pValue;
  228.         return $this;
  229.     }
  230.     
  231.     /**
  232.      * Get Description
  233.      *
  234.      * @return string 
  235.      */
  236.     public function getDescription({
  237.         return $this->_description;
  238.     }
  239.     
  240.     /**
  241.      * Set Description
  242.      *
  243.      * @param string $pValue 
  244.      * @return PHPExcel_DocumentProperties 
  245.      */
  246.     public function setDescription($pValue ''{
  247.         $this->_description $pValue;
  248.         return $this;
  249.     }
  250.     
  251.     /**
  252.      * Get Subject
  253.      *
  254.      * @return string 
  255.      */
  256.     public function getSubject({
  257.         return $this->_subject;
  258.     }
  259.     
  260.     /**
  261.      * Set Subject
  262.      *
  263.      * @param string $pValue 
  264.      * @return PHPExcel_DocumentProperties 
  265.      */
  266.     public function setSubject($pValue ''{
  267.         $this->_subject $pValue;
  268.         return $this;
  269.     }
  270.     
  271.     /**
  272.      * Get Keywords
  273.      *
  274.      * @return string 
  275.      */
  276.     public function getKeywords({
  277.         return $this->_keywords;
  278.     }
  279.     
  280.     /**
  281.      * Set Keywords
  282.      *
  283.      * @param string $pValue 
  284.      * @return PHPExcel_DocumentProperties 
  285.      */
  286.     public function setKeywords($pValue ''{
  287.         $this->_keywords $pValue;
  288.         return $this;
  289.     }
  290.     
  291.     /**
  292.      * Get Category
  293.      *
  294.      * @return string 
  295.      */
  296.     public function getCategory({
  297.         return $this->_category;
  298.     }
  299.     
  300.     /**
  301.      * Set Category
  302.      *
  303.      * @param string $pValue 
  304.      * @return PHPExcel_DocumentProperties 
  305.      */
  306.     public function setCategory($pValue ''{
  307.         $this->_category $pValue;
  308.         return $this;
  309.     }
  310.     
  311.     /**
  312.      * Get Company
  313.      *
  314.      * @return string 
  315.      */
  316.     public function getCompany({
  317.         return $this->_company;
  318.     }
  319.     
  320.     /**
  321.      * Set Company
  322.      *
  323.      * @param string $pValue 
  324.      * @return PHPPowerPoint_DocumentProperties 
  325.      */
  326.     public function setCompany($pValue ''{
  327.         $this->_company $pValue;
  328.         return $this;
  329.     }
  330.         
  331.     /**
  332.      * Implement PHP __clone to create a deep clone, not just a shallow copy.
  333.      */
  334.     public function __clone({
  335.         $vars get_object_vars($this);
  336.         foreach ($vars as $key => $value{
  337.             if (is_object($value)) {
  338.                 $this->$key clone $value;
  339.             else {
  340.                 $this->$key $value;
  341.             }
  342.         }
  343.     }
  344. }

Documentation generated on Tue, 01 Jun 2010 17:02:47 +0200 by phpDocumentor 1.4.3