Stamper.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: JZ
  5. * Date: 2019/7/19
  6. * Time: 9:38
  7. */
  8. class Stamper implements JsonSerializable {
  9. private $actionId; //签署动作ID
  10. private $signatoryId; //签署方ID
  11. private $type; //签署类型
  12. private $documentId; //签署文档Id
  13. private $sealId; //签署印章Id
  14. private $offsetX; //签署横坐标
  15. private $offsetY; //签署纵坐标
  16. private $page; //签署页码
  17. private $keyword; //关键字
  18. private $keywordIndex; //关键字索引
  19. public function jsonSerialize() {
  20. $data = [];
  21. foreach ($this as $key=>$val){
  22. if ($val !== null) $data[$key] = $val;
  23. }
  24. if(sizeof($data) < 1){
  25. return null;
  26. }
  27. return $data;
  28. }
  29. /**
  30. * @return mixed
  31. */
  32. public function getActionId()
  33. {
  34. return $this->actionId;
  35. }
  36. /**
  37. * @param mixed $actionId
  38. */
  39. public function setActionId($actionId)
  40. {
  41. $this->actionId = $actionId;
  42. }
  43. /**
  44. * @return mixed
  45. */
  46. public function getSignatoryId()
  47. {
  48. return $this->signatoryId;
  49. }
  50. /**
  51. * @param mixed $signatoryId
  52. */
  53. public function setSignatoryId($signatoryId)
  54. {
  55. $this->signatoryId = $signatoryId;
  56. }
  57. /**
  58. * @return mixed
  59. */
  60. public function getType()
  61. {
  62. return $this->type;
  63. }
  64. /**
  65. * @param mixed $type
  66. */
  67. public function setType($type)
  68. {
  69. $this->type = $type;
  70. }
  71. /**
  72. * @return mixed
  73. */
  74. public function getDocumentId()
  75. {
  76. return $this->documentId;
  77. }
  78. /**
  79. * @param mixed $documentId
  80. */
  81. public function setDocumentId($documentId)
  82. {
  83. $this->documentId = $documentId;
  84. }
  85. /**
  86. * @return mixed
  87. */
  88. public function getSealId()
  89. {
  90. return $this->sealId;
  91. }
  92. /**
  93. * @param mixed $sealId
  94. */
  95. public function setSealId($sealId)
  96. {
  97. $this->sealId = $sealId;
  98. }
  99. /**
  100. * @return mixed
  101. */
  102. public function getOffsetX()
  103. {
  104. return $this->offsetX;
  105. }
  106. /**
  107. * @param mixed $offsetX
  108. */
  109. public function setOffsetX($offsetX)
  110. {
  111. $this->offsetX = $offsetX;
  112. }
  113. /**
  114. * @return mixed
  115. */
  116. public function getOffsetY()
  117. {
  118. return $this->offsetY;
  119. }
  120. /**
  121. * @param mixed $offsetY
  122. */
  123. public function setOffsetY($offsetY)
  124. {
  125. $this->offsetY = $offsetY;
  126. }
  127. /**
  128. * @return mixed
  129. */
  130. public function getPage()
  131. {
  132. return $this->page;
  133. }
  134. /**
  135. * @param mixed $page
  136. */
  137. public function setPage($page)
  138. {
  139. $this->page = $page;
  140. }
  141. /**
  142. * @return mixed
  143. */
  144. public function getKeyword()
  145. {
  146. return $this->keyword;
  147. }
  148. /**
  149. * @param mixed $keyword
  150. */
  151. public function setKeyword($keyword)
  152. {
  153. $this->keyword = $keyword;
  154. }
  155. /**
  156. * @return mixed
  157. */
  158. public function getKeywordIndex()
  159. {
  160. return $this->keywordIndex;
  161. }
  162. /**
  163. * @param mixed $keywordIndex
  164. */
  165. public function setKeywordIndex($keywordIndex)
  166. {
  167. $this->keywordIndex = $keywordIndex;
  168. }
  169. }