コード例 #1
0
 /**
  * The method by which the object is visited and is serialized
  * @param RequestInterface $object
  * @param Serializer $serializer
  * @return array Returns a formatted string such as json, post data from the object
  * @throws \Upg\Library\AbstractException Should throw exception if there is an error
  */
 public function visit(RequestInterface $object, Serializer $serializer)
 {
     $data = $object->getSerializerData();
     $data = $this->checkSerializeArray($data, $serializer);
     /**
      * Do not serialize the whole data instead return it as an array
      */
     return $data;
 }
コード例 #2
0
ファイル: UrlEncode.php プロジェクト: vmrose/clientlibrary
 /**
  * The method by which the object is visited and is serialized
  * @param RequestInterface $object
  * @param Serializer $serializer
  * @return string Returns a formatted string such as json, post data from the object
  * @throws \Upg\Library\AbstractException Should throw exception if there is an error
  */
 public function visit(RequestInterface $object, Serializer $serializer)
 {
     $data = $object->getSerializerData();
     $data = $this->checkSerializeArray($data, $serializer);
     return http_build_query($data);
 }
コード例 #3
0
ファイル: Json.php プロジェクト: vmrose/clientlibrary
 /**
  * The method by which the object is visited and is serialized
  * @param RequestInterface $object
  * @param Serializer $serializer
  * @return string Returns a formatted string such as json, post data from the object
  * @throws \Upg\Library\AbstractException Should throw exception if there is an error
  */
 public function visit(RequestInterface $object, Serializer $serializer)
 {
     $data = $object->getSerializerData();
     $data = $this->checkSerializeArray($data, $serializer);
     return json_encode($data);
 }