DocumentProperties.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <?php
  2. /**
  3. * PHPWord
  4. *
  5. * Copyright (c) 2011 PHPWord
  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 PHPWord
  22. * @package PHPWord
  23. * @copyright Copyright (c) 010 PHPWord
  24. * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
  25. * @version Beta 0.6.3, 08.07.2011
  26. */
  27. /**
  28. * PHPWord_DocumentProperties
  29. *
  30. * @category PHPWord
  31. * @package PHPWord
  32. * @copyright Copyright (c) 2009 - 2011 PHPWord (http://www.codeplex.com/PHPWord)
  33. */
  34. class PHPWord_DocumentProperties {
  35. /**
  36. * Creator
  37. *
  38. * @var string
  39. */
  40. private $_creator;
  41. /**
  42. * LastModifiedBy
  43. *
  44. * @var string
  45. */
  46. private $_lastModifiedBy;
  47. /**
  48. * Created
  49. *
  50. * @var datetime
  51. */
  52. private $_created;
  53. /**
  54. * Modified
  55. *
  56. * @var datetime
  57. */
  58. private $_modified;
  59. /**
  60. * Title
  61. *
  62. * @var string
  63. */
  64. private $_title;
  65. /**
  66. * Description
  67. *
  68. * @var string
  69. */
  70. private $_description;
  71. /**
  72. * Subject
  73. *
  74. * @var string
  75. */
  76. private $_subject;
  77. /**
  78. * Keywords
  79. *
  80. * @var string
  81. */
  82. private $_keywords;
  83. /**
  84. * Category
  85. *
  86. * @var string
  87. */
  88. private $_category;
  89. /**
  90. * Company
  91. *
  92. * @var string
  93. */
  94. private $_company;
  95. /**
  96. * Create new PHPWord_DocumentProperties
  97. */
  98. public function __construct() {
  99. $this->_creator = '';
  100. $this->_lastModifiedBy = $this->_creator;
  101. $this->_created = time();
  102. $this->_modified = time();
  103. $this->_title = '';
  104. $this->_subject = '';
  105. $this->_description = '';
  106. $this->_keywords = '';
  107. $this->_category = '';
  108. $this->_company = '';
  109. }
  110. /**
  111. * Get Creator
  112. *
  113. * @return string
  114. */
  115. public function getCreator() {
  116. return $this->_creator;
  117. }
  118. /**
  119. * Set Creator
  120. *
  121. * @param string $pValue
  122. * @return PHPWord_DocumentProperties
  123. */
  124. public function setCreator($pValue = '') {
  125. $this->_creator = $pValue;
  126. return $this;
  127. }
  128. /**
  129. * Get Last Modified By
  130. *
  131. * @return string
  132. */
  133. public function getLastModifiedBy() {
  134. return $this->_lastModifiedBy;
  135. }
  136. /**
  137. * Set Last Modified By
  138. *
  139. * @param string $pValue
  140. * @return PHPWord_DocumentProperties
  141. */
  142. public function setLastModifiedBy($pValue = '') {
  143. $this->_lastModifiedBy = $pValue;
  144. return $this;
  145. }
  146. /**
  147. * Get Created
  148. *
  149. * @return datetime
  150. */
  151. public function getCreated() {
  152. return $this->_created;
  153. }
  154. /**
  155. * Set Created
  156. *
  157. * @param datetime $pValue
  158. * @return PHPWord_DocumentProperties
  159. */
  160. public function setCreated($pValue = null) {
  161. if (is_null($pValue)) {
  162. $pValue = time();
  163. }
  164. $this->_created = $pValue;
  165. return $this;
  166. }
  167. /**
  168. * Get Modified
  169. *
  170. * @return datetime
  171. */
  172. public function getModified() {
  173. return $this->_modified;
  174. }
  175. /**
  176. * Set Modified
  177. *
  178. * @param datetime $pValue
  179. * @return PHPWord_DocumentProperties
  180. */
  181. public function setModified($pValue = null) {
  182. if (is_null($pValue)) {
  183. $pValue = time();
  184. }
  185. $this->_modified = $pValue;
  186. return $this;
  187. }
  188. /**
  189. * Get Title
  190. *
  191. * @return string
  192. */
  193. public function getTitle() {
  194. return $this->_title;
  195. }
  196. /**
  197. * Set Title
  198. *
  199. * @param string $pValue
  200. * @return PHPWord_DocumentProperties
  201. */
  202. public function setTitle($pValue = '') {
  203. $this->_title = $pValue;
  204. return $this;
  205. }
  206. /**
  207. * Get Description
  208. *
  209. * @return string
  210. */
  211. public function getDescription() {
  212. return $this->_description;
  213. }
  214. /**
  215. * Set Description
  216. *
  217. * @param string $pValue
  218. * @return PHPWord_DocumentProperties
  219. */
  220. public function setDescription($pValue = '') {
  221. $this->_description = $pValue;
  222. return $this;
  223. }
  224. /**
  225. * Get Subject
  226. *
  227. * @return string
  228. */
  229. public function getSubject() {
  230. return $this->_subject;
  231. }
  232. /**
  233. * Set Subject
  234. *
  235. * @param string $pValue
  236. * @return PHPWord_DocumentProperties
  237. */
  238. public function setSubject($pValue = '') {
  239. $this->_subject = $pValue;
  240. return $this;
  241. }
  242. /**
  243. * Get Keywords
  244. *
  245. * @return string
  246. */
  247. public function getKeywords() {
  248. return $this->_keywords;
  249. }
  250. /**
  251. * Set Keywords
  252. *
  253. * @param string $pValue
  254. * @return PHPWord_DocumentProperties
  255. */
  256. public function setKeywords($pValue = '') {
  257. $this->_keywords = $pValue;
  258. return $this;
  259. }
  260. /**
  261. * Get Category
  262. *
  263. * @return string
  264. */
  265. public function getCategory() {
  266. return $this->_category;
  267. }
  268. /**
  269. * Set Category
  270. *
  271. * @param string $pValue
  272. * @return PHPWord_DocumentProperties
  273. */
  274. public function setCategory($pValue = '') {
  275. $this->_category = $pValue;
  276. return $this;
  277. }
  278. /**
  279. * Get Company
  280. *
  281. * @return string
  282. */
  283. public function getCompany() {
  284. return $this->_company;
  285. }
  286. /**
  287. * Set Company
  288. *
  289. * @param string $pValue
  290. * @return PHPWord_DocumentProperties
  291. */
  292. public function setCompany($pValue = '') {
  293. $this->_company = $pValue;
  294. return $this;
  295. }
  296. }
  297. ?>