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.4, 2010-08-26
  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->_manager            '';
  123.         $this->_company         'Microsoft Corporation';
  124.     }
  125.  
  126.     /**
  127.      * Get Creator
  128.      *
  129.      * @return string 
  130.      */
  131.     public function getCreator({
  132.         return $this->_creator;
  133.     }
  134.  
  135.     /**
  136.      * Set Creator
  137.      *
  138.      * @param string $pValue 
  139.      * @return PHPExcel_DocumentProperties 
  140.      */
  141.     public function setCreator($pValue ''{
  142.         $this->_creator $pValue;
  143.         return $this;
  144.     }
  145.  
  146.     /**
  147.      * Get Last Modified By
  148.      *
  149.      * @return string 
  150.      */
  151.     public function getLastModifiedBy({
  152.         return $this->_lastModifiedBy;
  153.     }
  154.  
  155.     /**
  156.      * Set Last Modified By
  157.      *
  158.      * @param string $pValue 
  159.      * @return PHPExcel_DocumentProperties 
  160.      */
  161.     public function setLastModifiedBy($pValue ''{
  162.         $this->_lastModifiedBy $pValue;
  163.         return $this;
  164.     }
  165.  
  166.     /**
  167.      * Get Created
  168.      *
  169.      * @return datetime 
  170.      */
  171.     public function getCreated({
  172.         return $this->_created;
  173.     }
  174.  
  175.     /**
  176.      * Set Created
  177.      *
  178.      * @param datetime $pValue 
  179.      * @return PHPExcel_DocumentProperties 
  180.      */
  181.     public function setCreated($pValue null{
  182.         if (is_null($pValue)) {
  183.             $pValue time();
  184.         }
  185.         $this->_created $pValue;
  186.         return $this;
  187.     }
  188.  
  189.     /**
  190.      * Get Modified
  191.      *
  192.      * @return datetime 
  193.      */
  194.     public function getModified({
  195.         return $this->_modified;
  196.     }
  197.  
  198.     /**
  199.      * Set Modified
  200.      *
  201.      * @param datetime $pValue 
  202.      * @return PHPExcel_DocumentProperties 
  203.      */
  204.     public function setModified($pValue null{
  205.         if (is_null($pValue)) {
  206.             $pValue time();
  207.         }
  208.         $this->_modified $pValue;
  209.         return $this;
  210.     }
  211.  
  212.     /**
  213.      * Get Title
  214.      *
  215.      * @return string 
  216.      */
  217.     public function getTitle({
  218.         return $this->_title;
  219.     }
  220.  
  221.     /**
  222.      * Set Title
  223.      *
  224.      * @param string $pValue 
  225.      * @return PHPExcel_DocumentProperties 
  226.      */
  227.     public function setTitle($pValue ''{
  228.         $this->_title $pValue;
  229.         return $this;
  230.     }
  231.  
  232.     /**
  233.      * Get Description
  234.      *
  235.      * @return string 
  236.      */
  237.     public function getDescription({
  238.         return $this->_description;
  239.     }
  240.  
  241.     /**
  242.      * Set Description
  243.      *
  244.      * @param string $pValue 
  245.      * @return PHPExcel_DocumentProperties 
  246.      */
  247.     public function setDescription($pValue ''{
  248.         $this->_description $pValue;
  249.         return $this;
  250.     }
  251.  
  252.     /**
  253.      * Get Subject
  254.      *
  255.      * @return string 
  256.      */
  257.     public function getSubject({
  258.         return $this->_subject;
  259.     }
  260.  
  261.     /**
  262.      * Set Subject
  263.      *
  264.      * @param string $pValue 
  265.      * @return PHPExcel_DocumentProperties 
  266.      */
  267.     public function setSubject($pValue ''{
  268.         $this->_subject $pValue;
  269.         return $this;
  270.     }
  271.  
  272.     /**
  273.      * Get Keywords
  274.      *
  275.      * @return string 
  276.      */
  277.     public function getKeywords({
  278.         return $this->_keywords;
  279.     }
  280.  
  281.     /**
  282.      * Set Keywords
  283.      *
  284.      * @param string $pValue 
  285.      * @return PHPExcel_DocumentProperties 
  286.      */
  287.     public function setKeywords($pValue ''{
  288.         $this->_keywords $pValue;
  289.         return $this;
  290.     }
  291.  
  292.     /**
  293.      * Get Category
  294.      *
  295.      * @return string 
  296.      */
  297.     public function getCategory({
  298.         return $this->_category;
  299.     }
  300.  
  301.     /**
  302.      * Set Category
  303.      *
  304.      * @param string $pValue 
  305.      * @return PHPExcel_DocumentProperties 
  306.      */
  307.     public function setCategory($pValue ''{
  308.         $this->_category $pValue;
  309.         return $this;
  310.     }
  311.  
  312.     /**
  313.      * Get Company
  314.      *
  315.      * @return string 
  316.      */
  317.     public function getCompany({
  318.         return $this->_company;
  319.     }
  320.  
  321.     /**
  322.      * Set Company
  323.      *
  324.      * @param string $pValue 
  325.      * @return PHPExcel_DocumentProperties 
  326.      */
  327.     public function setCompany($pValue ''{
  328.         $this->_company $pValue;
  329.         return $this;
  330.     }
  331.  
  332.     /**
  333.      * Get Manager
  334.      *
  335.      * @return string 
  336.      */
  337.     public function getManager({
  338.         return $this->_manager;
  339.     }
  340.  
  341.     /**
  342.      * Set Manager
  343.      *
  344.      * @param string $pValue 
  345.      * @return PHPExcel_DocumentProperties 
  346.      */
  347.     public function setManager($pValue ''{
  348.         $this->_manager $pValue;
  349.         return $this;
  350.     }
  351.  
  352.     /**
  353.      * Implement PHP __clone to create a deep clone, not just a shallow copy.
  354.      */
  355.     public function __clone({
  356.         $vars get_object_vars($this);
  357.         foreach ($vars as $key => $value{
  358.             if (is_object($value)) {
  359.                 $this->$key clone $value;
  360.             else {
  361.                 $this->$key $value;
  362.             }
  363.         }
  364.     }
  365. }

Documentation generated on Thu, 26 Aug 2010 17:41:12 +0200 by phpDocumentor 1.4.3