-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to Generator 6 (locally with bug fix) to allow Symfony 6
- Loading branch information
Showing
128 changed files
with
20,076 additions
and
10,419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
# PHPUnit | ||
/app/phpunit.xml | ||
/phpunit.xml | ||
/.phpunit.result.cache | ||
|
||
# Build data | ||
/build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.4.0 | ||
6.0.1-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<?php | ||
/** | ||
* ApiServer. | ||
* ApiServer | ||
* | ||
* PHP version 7.1.3 | ||
* PHP version 8.1.1 | ||
* | ||
* @category Class | ||
* | ||
* @package OpenAPI\Server\Api | ||
* @author OpenAPI Generator team | ||
* | ||
* @see https://github.com/openapitools/openapi-generator | ||
* @link https://github.com/openapitools/openapi-generator | ||
*/ | ||
|
||
/** | ||
* Catroweb API. | ||
* Catroweb API | ||
* | ||
* API for the Catrobat Share Platform | ||
* | ||
* The version of the OpenAPI document: v1.1.0 | ||
* The version of the OpenAPI document: v1.1.1 | ||
* Contact: [email protected] | ||
* Generated by: https://github.com/openapitools/openapi-generator.git | ||
* | ||
*/ | ||
|
||
/** | ||
|
@@ -30,53 +30,51 @@ | |
namespace OpenAPI\Server\Api; | ||
|
||
/** | ||
* ApiServer Class Doc Comment. | ||
* ApiServer Class Doc Comment | ||
* | ||
* PHP version 5 | ||
* PHP version 8.1.1 | ||
* | ||
* @category Class | ||
* | ||
* @package OpenAPI\Server\Api | ||
* @author OpenAPI Generator team | ||
* | ||
* @see https://github.com/openapitools/openapi-generator | ||
* @link https://github.com/openapitools/openapi-generator | ||
*/ | ||
class ApiServer | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
private $apis = []; | ||
|
||
/** | ||
* Adds an API handler to the server. | ||
* | ||
* @param string $api An API name of the handle | ||
* @param mixed $handler A handler to set for the given API | ||
*/ | ||
public function addApiHandler($api, $handler) | ||
{ | ||
if (isset($this->apis[$api])) { | ||
throw new \InvalidArgumentException('API has already a handler: '.$api); | ||
} | ||
/** | ||
* @var array | ||
*/ | ||
private $apis = array(); | ||
|
||
$this->apis[$api] = $handler; | ||
} | ||
/** | ||
* Adds an API handler to the server. | ||
* | ||
* @param string $api An API name of the handle | ||
* @param mixed $handler A handler to set for the given API | ||
*/ | ||
public function addApiHandler($api, $handler) | ||
{ | ||
if (isset($this->apis[$api])) { | ||
throw new \InvalidArgumentException('API has already a handler: '.$api); | ||
} | ||
|
||
/** | ||
* Returns an API handler. | ||
* | ||
* @param string $api An API name of the handle | ||
* | ||
* @throws \InvalidArgumentException When no such handler exists | ||
* | ||
* @return mixed Returns a handler | ||
*/ | ||
public function getApiHandler($api) | ||
{ | ||
if (!isset($this->apis[$api])) { | ||
throw new \InvalidArgumentException('No handler for '.$api.' implemented.'); | ||
$this->apis[$api] = $handler; | ||
} | ||
|
||
return $this->apis[$api]; | ||
} | ||
/** | ||
* Returns an API handler. | ||
* | ||
* @param string $api An API name of the handle | ||
* @return mixed Returns a handler | ||
* @throws \InvalidArgumentException When no such handler exists | ||
*/ | ||
public function getApiHandler($api) | ||
{ | ||
if (!isset($this->apis[$api])) { | ||
throw new \InvalidArgumentException('No handler for '.$api.' implemented.'); | ||
} | ||
|
||
return $this->apis[$api]; | ||
} | ||
} |
Oops, something went wrong.