示例#1
0
 /**
  * @param Type\Handler $handler
  * @param object $object
  * @param mixed $value
  *
  * @return Deserialize
  */
 private function processDeserializeTypeHandler(Type\Handler $handler, $object, $value) : self
 {
     $handler->deserializer()->deserialize($object, $value);
     return $this;
 }
示例#2
0
 /**
  * @param Type\Handler $handler
  * @param object $object
  * @param mixed[] $data
  * @param string $attribute
  *
  * @return mixed[]
  */
 private function processSerializeTypeHandler(Type\Handler $handler, $object, array $data, string $attribute) : array
 {
     $value = $handler->serializer()->serialize($object);
     if ($this->checkNullForAttribute($value, $attribute) === false) {
         $data[$attribute] = $value;
     }
     return $data;
 }