Skip to content

Commit 5edd8a7

Browse files
committed
Issue #179: added php mustache templates.
1 parent 4bd9ef4 commit 5edd8a7

20 files changed

+2564
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
return Symfony\CS\Config::create()
4+
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
5+
->setUsingCache(true)
6+
->fixers(
7+
[
8+
'ordered_use',
9+
'phpdoc_order',
10+
'short_array_syntax',
11+
'strict',
12+
'strict_param'
13+
]
14+
)
15+
->finder(
16+
Symfony\CS\Finder\DefaultFinder::create()
17+
->in(__DIR__)
18+
);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: php
2+
sudo: false
3+
php:
4+
- 5.4
5+
- 5.5
6+
- 5.6
7+
- 7.0
8+
- hhvm
9+
before_install: "composer install"
10+
script: "vendor/bin/phpunit"
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?php
2+
/**
3+
* ApiException
4+
* PHP version 5
5+
*
6+
* @category Class
7+
* @package {{invokerPackage}}
8+
* @author Swagger Codegen team
9+
* @link https://github.com/swagger-api/swagger-codegen
10+
*/
11+
12+
{{>partial_header}}
13+
/**
14+
* NOTE: This class is auto generated by the swagger code generator program.
15+
* https://github.com/swagger-api/swagger-codegen
16+
* Do not edit the class manually.
17+
*/
18+
19+
namespace {{invokerPackage}};
20+
21+
use \Exception;
22+
23+
/**
24+
* ApiException Class Doc Comment
25+
*
26+
* @category Class
27+
* @package {{invokerPackage}}
28+
* @author Swagger Codegen team
29+
* @link https://github.com/swagger-api/swagger-codegen
30+
*/
31+
class ApiException extends Exception
32+
{
33+
34+
/**
35+
* The HTTP body of the server response either as Json or string.
36+
*
37+
* @var mixed
38+
*/
39+
protected $responseBody;
40+
41+
/**
42+
* The HTTP header of the server response.
43+
*
44+
* @var string[]|null
45+
*/
46+
protected $responseHeaders;
47+
48+
/**
49+
* The deserialized response object
50+
*
51+
* @var $responseObject;
52+
*/
53+
protected $responseObject;
54+
55+
/**
56+
* Constructor
57+
*
58+
* @param string $message Error message
59+
* @param int $code HTTP status code
60+
* @param string[]|null $responseHeaders HTTP response header
61+
* @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string
62+
*/
63+
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
64+
{
65+
parent::__construct($message, $code);
66+
$this->responseHeaders = $responseHeaders;
67+
$this->responseBody = $responseBody;
68+
}
69+
70+
/**
71+
* Gets the HTTP response header
72+
*
73+
* @return string[]|null HTTP response header
74+
*/
75+
public function getResponseHeaders()
76+
{
77+
return $this->responseHeaders;
78+
}
79+
80+
/**
81+
* Gets the HTTP body of the server response either as Json or string
82+
*
83+
* @return mixed HTTP body of the server response either as \stdClass or string
84+
*/
85+
public function getResponseBody()
86+
{
87+
return $this->responseBody;
88+
}
89+
90+
/**
91+
* Sets the deseralized response object (during deserialization)
92+
*
93+
* @param mixed $obj Deserialized response object
94+
*
95+
* @return void
96+
*/
97+
public function setResponseObject($obj)
98+
{
99+
$this->responseObject = $obj;
100+
}
101+
102+
/**
103+
* Gets the deseralized response object (during deserialization)
104+
*
105+
* @return mixed the deserialized response object
106+
*/
107+
public function getResponseObject()
108+
{
109+
return $this->responseObject;
110+
}
111+
}

0 commit comments

Comments
 (0)