update php sample

This commit is contained in:
wing328 2015-06-09 13:31:14 +08:00
parent d155ddd026
commit 7fd996bc86
11 changed files with 1682 additions and 1666 deletions

View File

@ -153,14 +153,17 @@ return;
foreach($authSettings as $auth) { foreach($authSettings as $auth) {
// determine which one to use // determine which one to use
switch($auth) { switch($auth) {
case 'api_key': case 'api_key':
$headerParams['api_key'] = $this->getApiKeyWithPrefix('api_key'); $headerParams['api_key'] = $this->getApiKeyWithPrefix('api_key');
break; break;
case 'petstore_auth': case 'petstore_auth':
//TODO support oauth //TODO support oauth
break; break;
default: default:
//TODO show warning about security definition not found //TODO show warning about security definition not found
} }

View File

@ -53,6 +53,7 @@ public function setApiClient($apiClient) {
$this->apiClient = $apiClient; $this->apiClient = $apiClient;
} }
/** /**
* updatePet * updatePet
* *
@ -106,6 +107,7 @@ $this->apiClient = $apiClient;
} }
/** /**
* addPet * addPet
* *
@ -159,6 +161,7 @@ $this->apiClient = $apiClient;
} }
/** /**
* findPetsByStatus * findPetsByStatus
* *
@ -216,6 +219,7 @@ $this->apiClient = $apiClient;
$responseObject = $this->apiClient->deserialize($response,'array[Pet]'); $responseObject = $this->apiClient->deserialize($response,'array[Pet]');
return $responseObject; return $responseObject;
} }
/** /**
* findPetsByTags * findPetsByTags
* *
@ -273,6 +277,7 @@ $this->apiClient = $apiClient;
$responseObject = $this->apiClient->deserialize($response,'array[Pet]'); $responseObject = $this->apiClient->deserialize($response,'array[Pet]');
return $responseObject; return $responseObject;
} }
/** /**
* getPetById * getPetById
* *
@ -336,6 +341,7 @@ $this->apiClient = $apiClient;
$responseObject = $this->apiClient->deserialize($response,'Pet'); $responseObject = $this->apiClient->deserialize($response,'Pet');
return $responseObject; return $responseObject;
} }
/** /**
* updatePetWithForm * updatePetWithForm
* *
@ -402,6 +408,7 @@ $this->apiClient = $apiClient;
} }
/** /**
* deletePet * deletePet
* *
@ -464,6 +471,7 @@ $this->apiClient = $apiClient;
} }
/** /**
* uploadFile * uploadFile
* *
@ -531,4 +539,5 @@ $this->apiClient = $apiClient;
} }
} }

View File

@ -53,6 +53,7 @@ public function setApiClient($apiClient) {
$this->apiClient = $apiClient; $this->apiClient = $apiClient;
} }
/** /**
* getInventory * getInventory
* *
@ -106,6 +107,7 @@ $this->apiClient = $apiClient;
$responseObject = $this->apiClient->deserialize($response,'map[string,int]'); $responseObject = $this->apiClient->deserialize($response,'map[string,int]');
return $responseObject; return $responseObject;
} }
/** /**
* placeOrder * placeOrder
* *
@ -164,6 +166,7 @@ $this->apiClient = $apiClient;
$responseObject = $this->apiClient->deserialize($response,'Order'); $responseObject = $this->apiClient->deserialize($response,'Order');
return $responseObject; return $responseObject;
} }
/** /**
* getOrderById * getOrderById
* *
@ -227,6 +230,7 @@ $this->apiClient = $apiClient;
$responseObject = $this->apiClient->deserialize($response,'Order'); $responseObject = $this->apiClient->deserialize($response,'Order');
return $responseObject; return $responseObject;
} }
/** /**
* deleteOrder * deleteOrder
* *
@ -286,4 +290,5 @@ $this->apiClient = $apiClient;
} }
} }

View File

@ -53,6 +53,7 @@ public function setApiClient($apiClient) {
$this->apiClient = $apiClient; $this->apiClient = $apiClient;
} }
/** /**
* createUser * createUser
* *
@ -106,6 +107,7 @@ $this->apiClient = $apiClient;
} }
/** /**
* createUsersWithArrayInput * createUsersWithArrayInput
* *
@ -159,6 +161,7 @@ $this->apiClient = $apiClient;
} }
/** /**
* createUsersWithListInput * createUsersWithListInput
* *
@ -212,6 +215,7 @@ $this->apiClient = $apiClient;
} }
/** /**
* loginUser * loginUser
* *
@ -273,6 +277,7 @@ $this->apiClient = $apiClient;
$responseObject = $this->apiClient->deserialize($response,'string'); $responseObject = $this->apiClient->deserialize($response,'string');
return $responseObject; return $responseObject;
} }
/** /**
* logoutUser * logoutUser
* *
@ -321,6 +326,7 @@ $this->apiClient = $apiClient;
} }
/** /**
* getUserByName * getUserByName
* *
@ -384,6 +390,7 @@ $this->apiClient = $apiClient;
$responseObject = $this->apiClient->deserialize($response,'User'); $responseObject = $this->apiClient->deserialize($response,'User');
return $responseObject; return $responseObject;
} }
/** /**
* updateUser * updateUser
* *
@ -447,6 +454,7 @@ $this->apiClient = $apiClient;
} }
/** /**
* deleteUser * deleteUser
* *
@ -506,4 +514,5 @@ $this->apiClient = $apiClient;
} }
} }

View File

@ -15,7 +15,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* *
* *
@ -63,4 +62,3 @@ class Category implements ArrayAccess {
unset($this->$offset); unset($this->$offset);
} }
} }

View File

@ -15,7 +15,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* *
* *
@ -82,4 +81,3 @@ class Order implements ArrayAccess {
unset($this->$offset); unset($this->$offset);
} }
} }

View File

@ -15,7 +15,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* *
* *
@ -82,4 +81,3 @@ class Pet implements ArrayAccess {
unset($this->$offset); unset($this->$offset);
} }
} }

View File

@ -15,7 +15,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* *
* *
@ -63,4 +62,3 @@ class Tag implements ArrayAccess {
unset($this->$offset); unset($this->$offset);
} }
} }

View File

@ -15,7 +15,6 @@
* limitations under the License. * limitations under the License.
*/ */
/** /**
* *
* *
@ -90,4 +89,3 @@ class User implements ArrayAccess {
unset($this->$offset); unset($this->$offset);
} }
} }