Image.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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_Style_Image
  29. *
  30. * @category PHPWord
  31. * @package PHPWord_Section
  32. * @copyright Copyright (c) 2011 PHPWord
  33. */
  34. class PHPWord_Style_Image {
  35. private $_width;
  36. private $_height;
  37. private $_align;
  38. /**
  39. * Margin Top
  40. *
  41. * @var int
  42. */
  43. private $_marginTop;
  44. /**
  45. * Margin Left
  46. *
  47. * @var int
  48. */
  49. private $_marginLeft;
  50. public function __construct() {
  51. $this->_width = null;
  52. $this->_height = null;
  53. $this->_align = null;
  54. $this->_marginTop = null;
  55. $this->_marginLeft = null;
  56. }
  57. public function setStyleValue($key, $value) {
  58. $this->$key = $value;
  59. }
  60. public function getWidth() {
  61. return $this->_width;
  62. }
  63. public function setWidth($pValue = null) {
  64. $this->_width = $pValue;
  65. }
  66. public function getHeight() {
  67. return $this->_height;
  68. }
  69. public function setHeight($pValue = null) {
  70. $this->_height = $pValue;
  71. }
  72. public function getAlign() {
  73. return $this->_align;
  74. }
  75. public function setAlign($pValue = null) {
  76. $this->_align = $pValue;
  77. }
  78. /**
  79. * Get Margin Top
  80. *
  81. * @return int
  82. */
  83. public function getMarginTop() {
  84. return $this->_marginTop;
  85. }
  86. /**
  87. * Set Margin Top
  88. *
  89. * @param int $pValue
  90. */
  91. public function setMarginTop($pValue = null) {
  92. $this->_marginTop = $pValue;
  93. return $this;
  94. }
  95. /**
  96. * Get Margin Left
  97. *
  98. * @return int
  99. */
  100. public function getMarginLeft() {
  101. return $this->_marginLeft;
  102. }
  103. /**
  104. * Set Margin Left
  105. *
  106. * @param int $pValue
  107. */
  108. public function setMarginLeft($pValue = null) {
  109. $this->_marginLeft = $pValue;
  110. return $this;
  111. }
  112. }
  113. ?>