add file response for php

This commit is contained in:
wing328
2015-06-26 17:06:30 +08:00
parent 4c2df94ec7
commit fcd0b31d7d
22 changed files with 154 additions and 153 deletions

View File

@@ -119,9 +119,9 @@ class Category implements ArrayAccess {
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) {
return json_encode($this, JSON_PRETTY_PRINT);
return json_encode(get_object_vars($this), JSON_PRETTY_PRINT);
} else {
return json_encode($this);
return json_encode(get_object_vars($this));
}
}
}

View File

@@ -223,9 +223,9 @@ class Order implements ArrayAccess {
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) {
return json_encode($this, JSON_PRETTY_PRINT);
return json_encode(get_object_vars($this), JSON_PRETTY_PRINT);
} else {
return json_encode($this);
return json_encode(get_object_vars($this));
}
}
}

View File

@@ -223,9 +223,9 @@ class Pet implements ArrayAccess {
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) {
return json_encode($this, JSON_PRETTY_PRINT);
return json_encode(get_object_vars($this), JSON_PRETTY_PRINT);
} else {
return json_encode($this);
return json_encode(get_object_vars($this));
}
}
}

View File

@@ -119,9 +119,9 @@ class Tag implements ArrayAccess {
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) {
return json_encode($this, JSON_PRETTY_PRINT);
return json_encode(get_object_vars($this), JSON_PRETTY_PRINT);
} else {
return json_encode($this);
return json_encode(get_object_vars($this));
}
}
}

View File

@@ -275,9 +275,9 @@ class User implements ArrayAccess {
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) {
return json_encode($this, JSON_PRETTY_PRINT);
return json_encode(get_object_vars($this), JSON_PRETTY_PRINT);
} else {
return json_encode($this);
return json_encode(get_object_vars($this));
}
}
}