forked from loafle/openapi-generator-original
Merge pull request #36 from mrjf/master
in Swagger.php, use dirname instead of grepping for slash, which could be / or \
This commit is contained in:
commit
f22dbc510d
@ -11,7 +11,7 @@
|
||||
* @param string $className the class to attempt to load
|
||||
*/
|
||||
function swagger_autoloader($className) {
|
||||
$currentDir = substr(__FILE__, 0, strrpos(__FILE__, '/'));
|
||||
$currentDir = dirname(__FILE__);
|
||||
if (file_exists($currentDir . '/' . $className . '.php')) {
|
||||
include $currentDir . '/' . $className . '.php';
|
||||
} elseif (file_exists($currentDir . '/models/' . $className . '.php')) {
|
||||
|
@ -11,7 +11,7 @@
|
||||
* @param string $className the class to attempt to load
|
||||
*/
|
||||
function swagger_autoloader($className) {
|
||||
$currentDir = substr(__FILE__, 0, strrpos(__FILE__, '/'));
|
||||
$currentDir = dirname(__FILE__);
|
||||
if (file_exists($currentDir . '/' . $className . '.php')) {
|
||||
include $currentDir . '/' . $className . '.php';
|
||||
} elseif (file_exists($currentDir . '/models/' . $className . '.php')) {
|
||||
|
@ -11,7 +11,7 @@
|
||||
* @param string $className the class to attempt to load
|
||||
*/
|
||||
function swagger_autoloader($className) {
|
||||
$currentDir = substr(__FILE__, 0, strrpos(__FILE__, '/'));
|
||||
$currentDir = dirname(__FILE__);
|
||||
if (file_exists($currentDir . '/' . $className . '.php')) {
|
||||
include $currentDir . '/' . $className . '.php';
|
||||
} elseif (file_exists($currentDir . '/models/' . $className . '.php')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user