123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- <?php
- /**
- * 水印配置
- */
- class Watermark implements JsonSerializable {
- private $type;
- private $content;
- private $fontSize;
- private $angle;
- private $fontColor;
- private $position;
- private $diaphaneity;
- private $imgScale;
- private $tileDensity;
- private $gratingSize;
- private $viewPermission;
- public function jsonSerialize() {
- $data = [];
- foreach ($this as $key=>$val){
- if ($val !== null) $data[$key] = $val;
- }
- if(sizeof($data) < 1){
- return null;
- }
- return $data;
- }
- /**
- * @return mixed
- */
- public function getType()
- {
- return $this->type;
- }
- /**
- * @param mixed $type
- */
- public function setType($type)
- {
- $this->type = $type;
- }
- /**
- * @return mixed
- */
- public function getContent()
- {
- return $this->content;
- }
- /**
- * @param mixed $content
- */
- public function setContent($content)
- {
- $this->content = $content;
- }
- /**
- * @return mixed
- */
- public function getFontSize()
- {
- return $this->fontSize;
- }
- /**
- * @param mixed $fontSize
- */
- public function setFontSize($fontSize)
- {
- $this->fontSize = $fontSize;
- }
- /**
- * @return mixed
- */
- public function getAngle()
- {
- return $this->angle;
- }
- /**
- * @param mixed $angle
- */
- public function setAngle($angle)
- {
- $this->angle = $angle;
- }
- /**
- * @return mixed
- */
- public function getFontColor()
- {
- return $this->fontColor;
- }
- /**
- * @param mixed $fontColor
- */
- public function setFontColor($fontColor)
- {
- $this->fontColor = $fontColor;
- }
- /**
- * @return mixed
- */
- public function getPosition()
- {
- return $this->position;
- }
- /**
- * @param mixed $position
- */
- public function setPosition($position)
- {
- $this->position = $position;
- }
- /**
- * @return mixed
- */
- public function getDiaphaneity()
- {
- return $this->diaphaneity;
- }
- /**
- * @param mixed $diaphaneity
- */
- public function setDiaphaneity($diaphaneity)
- {
- $this->diaphaneity = $diaphaneity;
- }
- /**
- * @return mixed
- */
- public function getImgScale()
- {
- return $this->imgScale;
- }
- /**
- * @param mixed $imgScale
- */
- public function setImgScale($imgScale)
- {
- $this->imgScale = $imgScale;
- }
- /**
- * @return mixed
- */
- public function getTileDensity()
- {
- return $this->tileDensity;
- }
- /**
- * @param mixed $tileDensity
- */
- public function setTileDensity($tileDensity)
- {
- $this->tileDensity = $tileDensity;
- }
- /**
- * @return mixed
- */
- public function getGratingSize()
- {
- return $this->gratingSize;
- }
- /**
- * @param mixed $gratingSize
- */
- public function setGratingSize($gratingSize)
- {
- $this->gratingSize = $gratingSize;
- }
- /**
- * @return mixed
- */
- public function getViewPermission()
- {
- return $this->viewPermission;
- }
- /**
- * @param mixed $viewPermission
- */
- public function setViewPermission($viewPermission)
- {
- $this->viewPermission = $viewPermission;
- }
- }
|