1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- /**
- * 合同自定义参数
- */
- class ContractCustomField implements JsonSerializable {
- private $key;
- private $name;
- private $value;
- 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 getKey()
- {
- return $this->key;
- }
- /**
- * @param mixed $key
- */
- public function setKey($key)
- {
- $this->key = $key;
- }
- /**
- * @return mixed
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * @param mixed $name
- */
- public function setName($name)
- {
- $this->name = $name;
- }
- /**
- * @return mixed
- */
- public function getValue()
- {
- return $this->value;
- }
- /**
- * @param mixed $value
- */
- public function setValue($value)
- {
- $this->value = $value;
- }
- }
|