Table.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. class PHPWord_Style_Table {
  28. private $_cellMarginTop;
  29. private $_cellMarginLeft;
  30. private $_cellMarginRight;
  31. private $_cellMarginBottom;
  32. public function __construct() {
  33. $this->_cellMarginTop = null;
  34. $this->_cellMarginLeft = null;
  35. $this->_cellMarginRight = null;
  36. $this->_cellMarginBottom = null;
  37. }
  38. public function setStyleValue($key, $value) {
  39. $this->$key = $value;
  40. }
  41. public function setCellMarginTop($pValue = null) {
  42. $this->_cellMarginTop = $pValue;
  43. }
  44. public function getCellMarginTop() {
  45. return $this->_cellMarginTop;
  46. }
  47. public function setCellMarginLeft($pValue = null) {
  48. $this->_cellMarginLeft = $pValue;
  49. }
  50. public function getCellMarginLeft() {
  51. return $this->_cellMarginLeft;
  52. }
  53. public function setCellMarginRight($pValue = null) {
  54. $this->_cellMarginRight = $pValue;
  55. }
  56. public function getCellMarginRight() {
  57. return $this->_cellMarginRight;
  58. }
  59. public function setCellMarginBottom($pValue = null) {
  60. $this->_cellMarginBottom = $pValue;
  61. }
  62. public function getCellMarginBottom() {
  63. return $this->_cellMarginBottom;
  64. }
  65. public function getCellMargin() {
  66. return array($this->_cellMarginTop, $this->_cellMarginLeft, $this->_cellMarginRight, $this->_cellMarginBottom);
  67. }
  68. }
  69. ?>