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 - 2008 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 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)
  24.  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  25.  * @version    1.6.4, 2008-10-27
  26.  */
  27.  
  28.  
  29. /**
  30.  * PHPExcel_DocumentProperties
  31.  *
  32.  * @category   PHPExcel
  33.  * @package    PHPExcel
  34.  * @copyright  Copyright (c) 2006 - 2008 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.      * Create a new PHPExcel_DocumentProperties
  102.      */
  103.     public function __construct()
  104.     {
  105.         // Initialise values
  106.         $this->_creator         = 'Unknown Creator';
  107.         $this->_lastModifiedBy     = $this->_creator;
  108.         $this->_created         = time();
  109.         $this->_modified         = time();
  110.         $this->_title            = "Untitled Spreadsheet";
  111.         $this->_subject            = '';
  112.         $this->_description        = '';
  113.         $this->_keywords        = '';
  114.         $this->_category        = '';
  115.     }
  116.     
  117.     /**
  118.      * Get Creator
  119.      *
  120.      * @return string 
  121.      */
  122.     public function getCreator({
  123.         return $this->_creator;
  124.     }
  125.     
  126.     /**
  127.      * Set Creator
  128.      *
  129.      * @param string $pValue 
  130.      */
  131.     public function setCreator($pValue ''{
  132.         $this->_creator = $pValue;
  133.     }
  134.     
  135.     /**
  136.      * Get Last Modified By
  137.      *
  138.      * @return string 
  139.      */
  140.     public function getLastModifiedBy({
  141.         return $this->_lastModifiedBy;
  142.     }
  143.     
  144.     /**
  145.      * Set Last Modified By
  146.      *
  147.      * @param string $pValue 
  148.      */
  149.     public function setLastModifiedBy($pValue ''{
  150.         $this->_lastModifiedBy = $pValue;
  151.     }
  152.     
  153.     /**
  154.      * Get Created
  155.      *
  156.      * @return datetime 
  157.      */
  158.     public function getCreated({
  159.         return $this->_created;
  160.     }
  161.     
  162.     /**
  163.      * Set Created
  164.      *
  165.      * @param datetime $pValue 
  166.      */
  167.     public function setCreated($pValue null{
  168.         if (is_null($pValue)) {
  169.             $pValue time();
  170.         }
  171.         $this->_created = $pValue;
  172.     }
  173.     
  174.     /**
  175.      * Get Modified
  176.      *
  177.      * @return datetime 
  178.      */
  179.     public function getModified({
  180.         return $this->_modified;
  181.     }
  182.     
  183.     /**
  184.      * Set Modified
  185.      *
  186.      * @param datetime $pValue 
  187.      */
  188.     public function setModified($pValue null{
  189.         if (is_null($pValue)) {
  190.             $pValue time();
  191.         }
  192.         $this->_modified = $pValue;
  193.     }
  194.     
  195.     /**
  196.      * Get Title
  197.      *
  198.      * @return string 
  199.      */
  200.     public function getTitle({
  201.         return $this->_title;
  202.     }
  203.     
  204.     /**
  205.      * Set Title
  206.      *
  207.      * @param string $pValue 
  208.      */
  209.     public function setTitle($pValue ''{
  210.         $this->_title = $pValue;
  211.     }
  212.     
  213.     /**
  214.      * Get Description
  215.      *
  216.      * @return string 
  217.      */
  218.     public function getDescription({
  219.         return $this->_description;
  220.     }
  221.     
  222.     /**
  223.      * Set Description
  224.      *
  225.      * @param string $pValue 
  226.      */
  227.     public function setDescription($pValue ''{
  228.         $this->_description = $pValue;
  229.     }
  230.     
  231.     /**
  232.      * Get Subject
  233.      *
  234.      * @return string 
  235.      */
  236.     public function getSubject({
  237.         return $this->_subject;
  238.     }
  239.     
  240.     /**
  241.      * Set Subject
  242.      *
  243.      * @param string $pValue 
  244.      */
  245.     public function setSubject($pValue ''{
  246.         $this->_subject = $pValue;
  247.     }
  248.     
  249.     /**
  250.      * Get Keywords
  251.      *
  252.      * @return string 
  253.      */
  254.     public function getKeywords({
  255.         return $this->_keywords;
  256.     }
  257.     
  258.     /**
  259.      * Set Keywords
  260.      *
  261.      * @param string $pValue 
  262.      */
  263.     public function setKeywords($pValue ''{
  264.         $this->_keywords = $pValue;
  265.     }
  266.     
  267.     /**
  268.      * Get Category
  269.      *
  270.      * @return string 
  271.      */
  272.     public function getCategory({
  273.         return $this->_category;
  274.     }
  275.     
  276.     /**
  277.      * Set Category
  278.      *
  279.      * @param string $pValue 
  280.      */
  281.     public function setCategory($pValue ''{
  282.         $this->_category = $pValue;
  283.     }
  284.         
  285.     /**
  286.      * Implement PHP __clone to create a deep clone, not just a shallow copy.
  287.      */
  288.     public function __clone({
  289.         $vars get_object_vars($this);
  290.         foreach ($vars as $key => $value{
  291.             if (is_object($value)) {
  292.                 $this->$key clone $value;
  293.             else {
  294.                 $this->$key $value;
  295.             }
  296.         }
  297.     }
  298. }

Documentation generated on Mon, 27 Oct 2008 08:38:13 +0100 by phpDocumentor 1.4.1