18 | */
19 | class RuntimeException extends \RuntimeException implements ExceptionInterface
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/openapi-spec/PullRequest.php:
--------------------------------------------------------------------------------
1 | fixtures('UsingRefs.php'));
16 | $this->assertCount(1, $openapi->components->parameters, 'OpenApi contains 1 reusable parameter specification');
17 | $this->assertEquals('ItemName', $openapi->components->parameters[0]->parameter, 'When no @OA\Parameter()->parameter is specified, use @OA\Parameter()->name');
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/LoggerTest.php:
--------------------------------------------------------------------------------
1 | assertEquals($expected, Logger::shorten($classes));
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/swagger-spec/petstore-with-external-docs/models/Pet.php:
--------------------------------------------------------------------------------
1 |
4 | A common scenario is to let swagger-php generate a definition based on your model class.
5 | These definitions can then be referenced with `ref="#/components/schemas/$classname"
6 | -1?(this.runtimeStyle.backgroundImage = "none",
3 | this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
4 | this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
5 | this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
6 | this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
7 | );}
8 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/petstore-3.0/models/RequestBody.php:
--------------------------------------------------------------------------------
1 | getConnection();
10 |
11 | $token = new Pages($db);
12 |
13 | if($token->auth()):
14 | http_response_code(200);
15 | echo json_encode(
16 | $token->auth()
17 | );
18 | else:
19 | http_response_code(404);
20 | echo json_encode(
21 | array(
22 | "type"=>"danger",
23 | "title"=>"Failed",
24 | "message"=>"Could not create the token for this API. Please contact your administrator."
25 | )
26 | );
27 | endif;
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/misc/misc-api.php:
--------------------------------------------------------------------------------
1 | array($vendorDir . '/symfony/polyfill-ctype'),
10 | 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'),
11 | 'Symfony\\Component\\Finder\\' => array($vendorDir . '/symfony/finder'),
12 | 'OpenApi\\' => array($vendorDir . '/zircote/swagger-php/src'),
13 | 'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
14 | 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib/Doctrine/Common/Lexer'),
15 | 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'),
16 | );
17 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/using-traits/ProductController.php:
--------------------------------------------------------------------------------
1 | $processors,
18 | ];
19 |
20 | $openapi = OpenApi\scan(__DIR__ . '/app', $options);
21 | $spec = json_encode($openapi, JSON_PRETTY_PRINT);
22 | file_put_contents(__DIR__ . '/schema-query-parameter-processor.json', $spec);
23 | //echo $spec;
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/UtilTest.php:
--------------------------------------------------------------------------------
1 | [
15 | 'Customer.php',
16 | 'CustomerInterface.php',
17 | 'GrandAncestor.php',
18 | 'InheritProperties',
19 | 'Parser',
20 | 'Processors',
21 | 'UsingRefs.php',
22 | 'UsingPhpDoc.php',
23 | ],
24 | ]);
25 | $this->assertSame('Fixture for ParserTest', $openapi->info->title, 'No errors about duplicate @OA\Info() annotations');
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/openapi-spec/UsersController.php:
--------------------------------------------------------------------------------
1 |
15 | *
16 | * @OA\Schema(
17 | * description="Tag",
18 | * title="Tag",
19 | * @OA\Xml(
20 | * name="Tag"
21 | * )
22 | * )
23 | */
24 | class Tag
25 | {
26 | /**
27 | * @OA\Property(
28 | * format="int64",
29 | * description="ID",
30 | * title="ID"
31 | * )
32 | *
33 | * @var integer
34 | */
35 | private $id;
36 |
37 | /**
38 | * @OA\Property(
39 | * description="Name",
40 | * title="Name"
41 | * )
42 | *
43 | * @var string
44 | */
45 | private $name;
46 | }
47 |
--------------------------------------------------------------------------------
/api/config/database.php:
--------------------------------------------------------------------------------
1 | conn = null;
15 | try{
16 | $this->conn = new PDO(
17 | "mysql:host=" .$this->host . ";
18 | port=" . $this->port. ";
19 | dbname=" .$this->database_name,
20 | $this->username,
21 | $this->password
22 | );
23 | }catch(PDOException $exception){
24 | echo "Database could not be connected: " .$exception->getmessage();
25 | }
26 | return $this->conn;
27 | }
28 | }
--------------------------------------------------------------------------------
/api/vendor/doctrine/annotations/phpstan.neon:
--------------------------------------------------------------------------------
1 | parameters:
2 | excludes_analyse:
3 | - %currentWorkingDirectory%/tests/*/Fixtures/*
4 | - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Annotations/ReservedKeywordsClasses.php
5 | - %currentWorkingDirectory%/tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php
6 | - %currentWorkingDirectory%/tests/Doctrine/Tests/DoctrineTestCase.php
7 | polluteScopeWithLoopInitialAssignments: true
8 | ignoreErrors:
9 | - '#Instantiated class Doctrine_Tests_Common_Annotations_Fixtures_ClassNoNamespaceNoComment not found#'
10 | - '#Property Doctrine\\Tests\\Common\\Annotations\\DummyClassNonAnnotationProblem::\$foo has unknown class#'
11 |
12 | # That tag is empty on purpose
13 | - '#PHPDoc tag @var has invalid value \(\)\: Unexpected token "\\n ", expected type at offset 15#'
14 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/swagger-spec/petstore/api.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Yaml\Tag;
13 |
14 | /**
15 | * @author Nicolas Grekas
16 | * @author Guilhem N.
17 | */
18 | final class TaggedValue
19 | {
20 | private $tag;
21 | private $value;
22 |
23 | public function __construct(string $tag, $value)
24 | {
25 | $this->tag = $tag;
26 | $this->value = $value;
27 | }
28 |
29 | public function getTag(): string
30 | {
31 | return $this->tag;
32 | }
33 |
34 | public function getValue()
35 | {
36 | return $this->value;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/AnalyserTest.php:
--------------------------------------------------------------------------------
1 | parseComment('@OA\Parameter(description="This is my parameter")');
14 | $this->assertIsArray($annotations);
15 | $parameter = $annotations[0];
16 | $this->assertInstanceOf('OpenApi\Annotations\Parameter', $parameter);
17 | $this->assertSame('This is my parameter', $parameter->description);
18 | }
19 |
20 | public function testDeprecatedAnnotationWarning()
21 | {
22 | $this->countExceptions = 1;
23 | $this->assertOpenApiLogEntryContains('The annotation @SWG\Definition() is deprecated.');
24 | $this->parseComment('@SWG\Definition()');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/api/vendor/symfony/finder/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/finder",
3 | "type": "library",
4 | "description": "Symfony Finder Component",
5 | "keywords": [],
6 | "homepage": "https://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Fabien Potencier",
11 | "email": "fabien@symfony.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "https://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=7.2.5"
20 | },
21 | "autoload": {
22 | "psr-4": { "Symfony\\Component\\Finder\\": "" },
23 | "exclude-from-classmap": [
24 | "/Tests/"
25 | ]
26 | },
27 | "minimum-stability": "dev",
28 | "extra": {
29 | "branch-alias": {
30 | "dev-master": "5.1-dev"
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/petstore-3.0/models/Category.php:
--------------------------------------------------------------------------------
1 |
15 | *
16 | * @OA\Schema(
17 | * description="Pets Category",
18 | * title="Pets Category",
19 | * @OA\Xml(
20 | * name="Category"
21 | * )
22 | * )
23 | */
24 | class Category
25 | {
26 | /**
27 | * @OA\Property(
28 | * title="ID",
29 | * description="ID",
30 | * format="int64",
31 | * )
32 | *
33 | * @var integer
34 | */
35 | private $id;
36 |
37 | /**
38 | * @OA\Property(
39 | * title="Category name",
40 | * description="Category name"
41 | * )
42 | *
43 | * @var string
44 | */
45 | private $name;
46 | }
47 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/swagger-spec/petstore-with-external-docs/docs.php:
--------------------------------------------------------------------------------
1 | =5.3.0"
24 | },
25 | "autoload": {
26 | "psr-4": {
27 | "Firebase\\JWT\\": "src"
28 | }
29 | },
30 | "require-dev": {
31 | "phpunit/phpunit": ">=4.8 <=9"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Processors/AugmentOperations.php:
--------------------------------------------------------------------------------
1 | getAnnotationsOfType(Operation::class);
20 |
21 | foreach ($allOperations as $operation) {
22 | if ($operation->summary === UNDEFINED) {
23 | $operation->summary = $operation->_context->phpdocSummary();
24 | }
25 | if ($operation->description === UNDEFINED) {
26 | $operation->description = $operation->_context->phpdocDescription();
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Fixtures/ThirdPartyAnnotations.php:
--------------------------------------------------------------------------------
1 | 'discriminator',
31 | Items::class => 'items',
32 | Property::class => ['properties', 'property'],
33 | ExternalDocumentation::class => 'externalDocs',
34 | Xml::class => 'xml',
35 | AdditionalProperties::class => 'additionalProperties',
36 | ];
37 | }
38 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Annotations/XmlContent.php:
--------------------------------------------------------------------------------
1 | 'discriminator',
32 | Items::class => 'items',
33 | Property::class => ['properties', 'property'],
34 | ExternalDocumentation::class => 'externalDocs',
35 | Xml::class => 'xml',
36 | AdditionalProperties::class => 'additionalProperties',
37 | ];
38 | }
39 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/swagger-spec/petstore-simple/api.php:
--------------------------------------------------------------------------------
1 | $value) {
23 | if (in_array($property, $skip)) {
24 | continue;
25 | }
26 | if ($value === null) {
27 | $this->fail('Property '.basename($annotation).'->'.$property.' should be DEFINED');
28 | }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/example-object/example-object.php:
--------------------------------------------------------------------------------
1 | =7.1"
19 | },
20 | "autoload": {
21 | "files": [
22 | "function.php"
23 | ]
24 | },
25 | "minimum-stability": "dev",
26 | "extra": {
27 | "branch-alias": {
28 | "dev-master": "2.1-dev"
29 | },
30 | "thanks": {
31 | "name": "symfony/contracts",
32 | "url": "https://github.com/symfony/contracts"
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/petstore-3.0/models/ApiResponse.php:
--------------------------------------------------------------------------------
1 |
15 | *
16 | * @OA\Schema(
17 | * description="Api response",
18 | * title="Api response"
19 | * )
20 | */
21 | class ApiResponse
22 | {
23 | /**
24 | * @OA\Property(
25 | * description="Code",
26 | * title="Code",
27 | * format="int32"
28 | * )
29 | *
30 | * @var int
31 | */
32 | private $code;
33 |
34 | /**
35 | * OA\Property(
36 | * description="Type",
37 | * title="Type",
38 | * )
39 | *
40 | * @var string
41 | */
42 | private $type;
43 |
44 | /**
45 | * @OA\Property(
46 | * description="Message",
47 | * title="Message"
48 | * )
49 | *
50 | * @var string
51 | */
52 | private $message;
53 | }
54 |
--------------------------------------------------------------------------------
/api/v1/pages/delete.php:
--------------------------------------------------------------------------------
1 | getConnection();
11 |
12 | $item = new Pages($db);
13 | $data = json_decode(file_get_contents('php://input'));
14 | $item->id = $data->id;
15 |
16 | if($item->delete()):
17 | http_response_code(200);
18 | echo json_encode(
19 | array(
20 | "type"=>"success",
21 | "title"=>"Success",
22 | "message"=>"The page was deleted successfully."
23 | )
24 | );
25 | else:
26 | http_response_code(404);
27 | echo json_encode(
28 | array(
29 | "type"=>"danger",
30 | "title"=>"Failed",
31 | "message"=>"The page was not deleted successfully. Please try again."
32 | )
33 | );
34 | endif;
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Processors/CleanUnmerged.php:
--------------------------------------------------------------------------------
1 | split();
16 | $merged = $split->merged->annotations;
17 | $unmerged = $split->unmerged->annotations;
18 |
19 | foreach ($analysis->annotations as $annotation) {
20 | if (property_exists($annotation, '_unmerged')) {
21 | foreach ($annotation->_unmerged as $i => $item) {
22 | if ($merged->contains($item)) {
23 | unset($annotation->_unmerged[$i]); // Property was merged
24 | }
25 | }
26 | }
27 | }
28 | $analysis->openapi->_unmerged = [];
29 | foreach ($unmerged as $annotation) {
30 | $analysis->openapi->_unmerged[] = $annotation;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/petstore.swagger.io/models/User.php:
--------------------------------------------------------------------------------
1 | 'discriminator',
38 | Items::class => 'items',
39 | Property::class => ['properties', 'property'],
40 | ExternalDocumentation::class => 'externalDocs',
41 | Xml::class => 'xml',
42 | AdditionalProperties::class => 'additionalProperties',
43 | ];
44 | }
45 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/petstore.swagger.io/swagger-v3.php:
--------------------------------------------------------------------------------
1 | properties array.
16 | *
17 | * @var string
18 | */
19 | public $property = UNDEFINED;
20 |
21 | /**
22 | * {@inheritdoc}
23 | */
24 | public static $_parents = [
25 | AdditionalProperties::class,
26 | Schema::class,
27 | JsonContent::class,
28 | XmlContent::class,
29 | Property::class,
30 | Items::class,
31 | ];
32 |
33 | /**
34 | * {@inheritdoc}
35 | */
36 | public static $_nested = [
37 | Discriminator::class => 'discriminator',
38 | Items::class => 'items',
39 | Property::class => ['properties', 'property'],
40 | ExternalDocumentation::class => 'externalDocs',
41 | Xml::class => 'xml',
42 | AdditionalProperties::class => 'additionalProperties',
43 | ];
44 | }
45 |
--------------------------------------------------------------------------------
/api/vendor/doctrine/annotations/README.md:
--------------------------------------------------------------------------------
1 | # Doctrine Annotations
2 |
3 | [](https://travis-ci.org/doctrine/annotations)
4 | [](https://www.versioneye.com/package/php--doctrine--annotations)
5 | [](https://www.versioneye.com/php/doctrine:annotations/references)
6 | [](https://packagist.org/packages/doctrine/annotations)
7 | [](https://packagist.org/packages/doctrine/annotations)
8 |
9 | Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)).
10 |
11 | ## Documentation
12 |
13 | See the [doctrine-project website](https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/index.html).
14 |
15 | ## Changelog
16 |
17 | See [CHANGELOG.md](CHANGELOG.md).
18 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Processors/MergeIntoOpenApiTest.php:
--------------------------------------------------------------------------------
1 | assertSame($openapi, $analysis->openapi);
29 | $this->assertSame(UNDEFINED, $openapi->info);
30 | $analysis->process(new MergeIntoOpenApi());
31 | $this->assertSame($openapi, $analysis->openapi);
32 | $this->assertSame($info, $openapi->info);
33 | $this->assertCount(0, $analysis->unmerged()->annotations);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Annotations/License.php:
--------------------------------------------------------------------------------
1 | 'string',
36 | 'url' => 'string',
37 | ];
38 |
39 | /**
40 | * {@inheritdoc}
41 | */
42 | public static $_required = ['name'];
43 |
44 | /**
45 | * {@inheritdoc}
46 | */
47 | public static $_parents = [
48 | Info::class,
49 | ];
50 | }
51 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Processors/MergeIntoComponents.php:
--------------------------------------------------------------------------------
1 | openapi->components;
21 | if ($components === UNDEFINED) {
22 | $components = new Components([]);
23 | $components->_context->generated = true;
24 | }
25 | $classes = array_keys(Components::$_nested);
26 | foreach ($analysis->annotations as $annotation) {
27 | $class = get_class($annotation);
28 | if (in_array($class, $classes) && $annotation->_context->is('nested') === false) { // A top level annotation.
29 | $components->merge([$annotation], true);
30 | $analysis->openapi->components = $components;
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/vendor/symfony/yaml/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2020 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Processors/MergeIntoComponentsTest.php:
--------------------------------------------------------------------------------
1 | '2xx']);
22 | $analysis = new Analysis(
23 | [
24 | $openapi,
25 | $response,
26 | ]
27 | );
28 | $this->assertSame(UNDEFINED, $openapi->components);
29 | $analysis->process(new MergeIntoComponents());
30 | $this->assertCount(1, $openapi->components->responses);
31 | $this->assertSame($response, $openapi->components->responses[0]);
32 | $this->assertCount(0, $analysis->unmerged()->annotations);
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/vendor/doctrine/lexer/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2006-2018 Doctrine Project
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/api/vendor/symfony/deprecation-contracts/function.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | if (!function_exists('trigger_deprecation')) {
13 | /**
14 | * Triggers a silenced deprecation notice.
15 | *
16 | * @param string $package The name of the Composer package that is triggering the deprecation
17 | * @param string $version The version of the package that introduced the deprecation
18 | * @param string $message The message of the deprecation
19 | * @param mixed ...$args Values to insert in the message using printf() formatting
20 | *
21 | * @author Nicolas Grekas
22 | */
23 | function trigger_deprecation(string $package, string $version, string $message, ...$args): void
24 | {
25 | @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), E_USER_DEPRECATED);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/api/vendor/symfony/finder/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2020 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/api/vendor/composer/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) Nils Adermann, Jordi Boggiano
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is furnished
9 | to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 |
22 |
--------------------------------------------------------------------------------
/api/vendor/doctrine/annotations/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2006-2013 Doctrine Project
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/api/vendor/symfony/polyfill-ctype/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018-2019 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/api/vendor/symfony/deprecation-contracts/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2020 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/docs/swagger-php-internals.md:
--------------------------------------------------------------------------------
1 | # How swagger-php works under the hood
2 |
3 | ## Flow
4 |
5 | - Finder crawls the filesystem
6 | - The (Static)Analyser reads the files and builds an Analysis object.
7 | - The Analysis object is then processed by the Processors.
8 | - The Analysis/Annotations are validated to notify the user of any known issues.
9 | - The OpenApi annotation then contains all annotations and generates the openapi.json
10 |
11 | ## Annotation Context
12 |
13 | The annotations contain metadata stored in a Context object which:
14 |
15 | - Contains the data thats needed by the processors to infer values.
16 | - When validation detects an error it can print the location (file and line number) of the offending annotation.
17 |
18 | ## Analysis
19 |
20 | Contains all detected annotations and other relevant meta data.
21 |
22 | It uses a SplObjectStorage to store the annotations, which is like an array but prevents duplicate entries.
23 |
24 | # Documentation
25 |
26 | Documentation is generated with [vuepress](https://vuepress.vuejs.org/)
27 |
28 | ```bash
29 | npm -g install vuepress
30 | cd docs
31 | vuepress dev
32 | ```
33 |
--------------------------------------------------------------------------------
/api/v1/pages/create.php:
--------------------------------------------------------------------------------
1 | getConnection();
11 |
12 | $item = new Pages($db);
13 | $data = json_decode(file_get_contents('php://input'));
14 | $item->slug = $data->slug;
15 | $item->orderid = $data->orderid;
16 | $item->title = $data->title;
17 | $item->content = $data->content;
18 |
19 | if($item->create()):
20 | http_response_code(200);
21 | echo json_encode(
22 | array(
23 | "type"=>"success",
24 | "title"=>"Success",
25 | "message"=>"The page was created successfully."
26 | )
27 | );
28 | else:
29 | http_response_code(404);
30 | echo json_encode(
31 | array(
32 | "type"=>"danger",
33 | "title"=>"Failed",
34 | "message"=>"The page was not created successfully. Please try again."
35 | )
36 | );
37 | endif;
--------------------------------------------------------------------------------
/api/v1/pages/update.php:
--------------------------------------------------------------------------------
1 | getConnection();
11 |
12 | $item = new Pages($db);
13 | $data = json_decode(file_get_contents('php://input'));
14 | $item->id = $data->id;
15 | $item->orderid = $data->orderid;
16 | $item->title = $data->title;
17 | $item->content = $data->content;
18 |
19 | if($item->update()):
20 | http_response_code(200);
21 | echo json_encode(
22 | array(
23 | "type"=>"success",
24 | "title"=>"Success",
25 | "message"=>"The page was updated successfully."
26 | )
27 | );
28 | else:
29 | http_response_code(404);
30 | echo json_encode(
31 | array(
32 | "type"=>"danger",
33 | "title"=>"Failed",
34 | "message"=>"The page was not updated successfully. Please try again."
35 | )
36 | );
37 | endif;
--------------------------------------------------------------------------------
/api/vendor/symfony/polyfill-ctype/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/polyfill-ctype",
3 | "type": "library",
4 | "description": "Symfony polyfill for ctype functions",
5 | "keywords": ["polyfill", "compatibility", "portable", "ctype"],
6 | "homepage": "https://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Gert de Pagter",
11 | "email": "BackEndTea@gmail.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "https://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=5.3.3"
20 | },
21 | "autoload": {
22 | "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
23 | "files": [ "bootstrap.php" ]
24 | },
25 | "suggest": {
26 | "ext-ctype": "For best performance"
27 | },
28 | "minimum-stability": "dev",
29 | "extra": {
30 | "branch-alias": {
31 | "dev-master": "1.18-dev"
32 | },
33 | "thanks": {
34 | "name": "symfony/polyfill",
35 | "url": "https://github.com/symfony/polyfill"
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/using-interfaces/using-interfaces-merge.yaml:
--------------------------------------------------------------------------------
1 | openapi: 3.0.0
2 | info:
3 | title: 'Example of using interfaces in swagger-php'
4 | version: 1.0.0
5 | paths:
6 | '/products/{id}':
7 | get:
8 | tags:
9 | - Products
10 | operationId: 'UsingInterfaces\ProductController::getProduct'
11 | parameters:
12 | -
13 | name: id
14 | in: path
15 | description: 'ID of product to return'
16 | required: true
17 | schema:
18 | type: string
19 | responses:
20 | default:
21 | description: 'successful operation'
22 | content:
23 | application/json:
24 | schema:
25 | $ref: '#/components/schemas/Product'
26 | components:
27 | schemas:
28 | Product:
29 | title: 'Product model'
30 | properties:
31 | name:
32 | description: 'The product name.'
33 | example: toaster
34 | id:
35 | description: 'The unique identifier of a product in our catalog.'
36 | type: integer
37 | format: int64
38 | example: 1
39 | type: object
40 | ProductInterface: { }
41 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/schema-query-parameter-processor/app/ProductController.php:
--------------------------------------------------------------------------------
1 | createOpenApiWithInfo();
19 | $info = $openapi->ref('#/info');
20 | $this->assertInstanceOf(Info::class, $info);
21 |
22 | $comment = <<merge($this->parseComment($comment));
29 | $analysis = new Analysis();
30 | $analysis->addAnnotation($openapi, Context::detect());
31 | $analysis->process();
32 |
33 | $analysis->validate();
34 | // escape / as ~1
35 | // escape ~ as ~0
36 | $response = $openapi->ref('#/paths/~1api~1~0~1endpoint/get/responses/default');
37 | $this->assertInstanceOf(Response::class, $response);
38 | $this->assertSame('A response', $response->description);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Annotations/Contact.php:
--------------------------------------------------------------------------------
1 | 'string',
43 | 'url' => 'string',
44 | 'email' => 'string',
45 | ];
46 |
47 | /**
48 | * {@inheritdoc}
49 | */
50 | public static $_parents = [
51 | Info::class,
52 | ];
53 | }
54 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Annotations/ResponseTest.php:
--------------------------------------------------------------------------------
1 | validateMisspelledAnnotation('Default');
16 | }
17 |
18 | public function testMisspelledRangeDefinition()
19 | {
20 | $this->validateMisspelledAnnotation('5xX');
21 | }
22 |
23 | public function testWrongRangeDefinition()
24 | {
25 | $this->validateMisspelledAnnotation('6XX');
26 | }
27 |
28 | protected function validateMisspelledAnnotation(string $response = '')
29 | {
30 | $annotations = $this->parseComment(
31 | '@OA\Get(@OA\Response(response="'.$response.'", description="description"))'
32 | );
33 | /*
34 | * @see Annotations/Operation.php:187
35 | */
36 | $this->assertOpenApiLogEntryContains(
37 | 'Invalid value "'.$response.'" for @OA\Response()->response, expecting "default"'
38 | .', a HTTP Status Code or HTTP '
39 | );
40 | $annotations[0]->validate();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/api/vendor/symfony/deprecation-contracts/README.md:
--------------------------------------------------------------------------------
1 | Symfony Deprecation Contracts
2 | =============================
3 |
4 | A generic function and convention to trigger deprecation notices.
5 |
6 | This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices.
7 |
8 | By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component,
9 | the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments.
10 |
11 | The function requires at least 3 arguments:
12 | - the name of the Composer package that is triggering the deprecation
13 | - the version of the package that introduced the deprecation
14 | - the message of the deprecation
15 | - more arguments can be provided: they will be inserted in the message using `printf()` formatting
16 |
17 | Example:
18 | ```php
19 | trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin');
20 | ```
21 |
22 | This will generate the following message:
23 | `Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.`
24 |
25 | While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty
26 | `function trigger_deprecation() {}` in your application.
27 |
--------------------------------------------------------------------------------
/api/vendor/symfony/yaml/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/yaml",
3 | "type": "library",
4 | "description": "Symfony Yaml Component",
5 | "keywords": [],
6 | "homepage": "https://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Fabien Potencier",
11 | "email": "fabien@symfony.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "https://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=7.2.5",
20 | "symfony/deprecation-contracts": "^2.1",
21 | "symfony/polyfill-ctype": "~1.8"
22 | },
23 | "require-dev": {
24 | "symfony/console": "^4.4|^5.0"
25 | },
26 | "conflict": {
27 | "symfony/console": "<4.4"
28 | },
29 | "suggest": {
30 | "symfony/console": "For validating YAML files using the lint command"
31 | },
32 | "autoload": {
33 | "psr-4": { "Symfony\\Component\\Yaml\\": "" },
34 | "exclude-from-classmap": [
35 | "/Tests/"
36 | ]
37 | },
38 | "bin": [
39 | "Resources/bin/yaml-lint"
40 | ],
41 | "minimum-stability": "dev",
42 | "extra": {
43 | "branch-alias": {
44 | "dev-master": "5.1-dev"
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/api/vendor/doctrine/lexer/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "doctrine/lexer",
3 | "type": "library",
4 | "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
5 | "keywords": [
6 | "php",
7 | "parser",
8 | "lexer",
9 | "annotations",
10 | "docblock"
11 | ],
12 | "homepage": "https://www.doctrine-project.org/projects/lexer.html",
13 | "license": "MIT",
14 | "authors": [
15 | {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
16 | {"name": "Roman Borschel", "email": "roman@code-factory.org"},
17 | {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}
18 | ],
19 | "require": {
20 | "php": "^7.2 || ^8.0"
21 | },
22 | "require-dev": {
23 | "doctrine/coding-standard": "^6.0",
24 | "phpstan/phpstan": "^0.11.8",
25 | "phpunit/phpunit": "^8.2"
26 | },
27 | "autoload": {
28 | "psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" }
29 | },
30 | "autoload-dev": {
31 | "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine" }
32 | },
33 | "extra": {
34 | "branch-alias": {
35 | "dev-master": "1.2.x-dev"
36 | }
37 | },
38 | "config": {
39 | "sort-packages": true
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Processors/AugmentParameters.php:
--------------------------------------------------------------------------------
1 | name as keyfield (parameter->parameter) when used as reusable component (openapi->components->parameters).
13 | */
14 | class AugmentParameters
15 | {
16 | public function __invoke(Analysis $analysis)
17 | {
18 | if ($analysis->openapi->components !== UNDEFINED && $analysis->openapi->components->parameters !== UNDEFINED) {
19 | $keys = [];
20 | $parametersWithoutKey = [];
21 | foreach ($analysis->openapi->components->parameters as $parameter) {
22 | if ($parameter->parameter !== UNDEFINED) {
23 | $keys[$parameter->parameter] = $parameter;
24 | } else {
25 | $parametersWithoutKey[] = $parameter;
26 | }
27 | }
28 | foreach ($parametersWithoutKey as $parameter) {
29 | if ($parameter->name !== UNDEFINED && empty($keys[$parameter->name])) {
30 | $parameter->parameter = $parameter->name;
31 | $keys[$parameter->parameter] = $parameter;
32 | }
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/api/vendor/symfony/yaml/Resources/bin/yaml-lint:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 |
8 | *
9 | * For the full copyright and license information, please view the LICENSE
10 | * file that was distributed with this source code.
11 | */
12 |
13 | /**
14 | * Runs the Yaml lint command.
15 | *
16 | * @author Jan Schädlich
17 | */
18 |
19 | use Symfony\Component\Console\Application;
20 | use Symfony\Component\Yaml\Command\LintCommand;
21 |
22 | function includeIfExists(string $file): bool
23 | {
24 | return file_exists($file) && include $file;
25 | }
26 |
27 | if (
28 | !includeIfExists(__DIR__ . '/../../../../autoload.php') &&
29 | !includeIfExists(__DIR__ . '/../../vendor/autoload.php') &&
30 | !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php')
31 | ) {
32 | fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL);
33 | exit(1);
34 | }
35 |
36 | if (!class_exists(Application::class)) {
37 | fwrite(STDERR, 'You need the "symfony/console" component in order to run the Yaml linter.'.PHP_EOL);
38 | exit(1);
39 | }
40 |
41 | (new Application())->add($command = new LintCommand())
42 | ->getApplication()
43 | ->setDefaultCommand($command->getName(), true)
44 | ->run()
45 | ;
46 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/using-interfaces/using-interfaces-inherit.yaml:
--------------------------------------------------------------------------------
1 | openapi: 3.0.0
2 | info:
3 | title: 'Example of using interfaces in swagger-php'
4 | version: 1.0.0
5 | paths:
6 | '/products/{id}':
7 | get:
8 | tags:
9 | - Products
10 | operationId: 'UsingInterfaces\ProductController::getProduct'
11 | parameters:
12 | -
13 | name: id
14 | in: path
15 | description: 'ID of product to return'
16 | required: true
17 | schema:
18 | type: string
19 | responses:
20 | default:
21 | description: 'successful operation'
22 | content:
23 | application/json:
24 | schema:
25 | $ref: '#/components/schemas/Product'
26 | components:
27 | schemas:
28 | Product:
29 | title: 'Product model'
30 | allOf:
31 | -
32 | $ref: '#/components/schemas/ProductInterface'
33 | -
34 | properties:
35 | id:
36 | description: 'The unique identifier of a product in our catalog.'
37 | type: integer
38 | format: int64
39 | example: 1
40 | ProductInterface:
41 | properties:
42 | name:
43 | description: 'The product name.'
44 | example: toaster
45 | type: object
46 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Processors/InheritInterfaces.php:
--------------------------------------------------------------------------------
1 | getAnnotationsOfType(Schema::class);
18 | foreach ($schemas as $schema) {
19 | if ($schema->_context->is('class')) {
20 | $interfaces = $analysis->getInterfacesOfClass($schema->_context->fullyQualifiedName($schema->_context->class), true);
21 | foreach ($interfaces as $interface) {
22 | if ($analysis->getSchemaForSource($interface['context']->fullyQualifiedName($interface['interface']))) {
23 | if ($schema->allOf === UNDEFINED) {
24 | $schema->allOf = [];
25 | }
26 | $schema->allOf[] = new Schema([
27 | '_context' => $interface['context']->_context,
28 | 'ref' => Components::SCHEMA_REF.$interface['interface'],
29 | ]);
30 | }
31 | }
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Processors/OperationId.php:
--------------------------------------------------------------------------------
1 | getAnnotationsOfType(Operation::class);
20 |
21 | foreach ($allOperations as $operation) {
22 | if ($operation->operationId !== UNDEFINED) {
23 | continue;
24 | }
25 | $context = $operation->_context;
26 | if ($context && $context->method) {
27 | $source = $context->class ?? $context->interface ?? $context->trait;
28 | if ($source) {
29 | if ($context->namespace) {
30 | $operation->operationId = $context->namespace.'\\'.$source.'::'.$context->method;
31 | } else {
32 | $operation->operationId = $source.'::'.$context->method;
33 | }
34 | } else {
35 | $operation->operationId = $context->method;
36 | }
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/CommandlineInterfaceTest.php:
--------------------------------------------------------------------------------
1 | /dev/null', $output, $retval);
20 | $this->assertSame(0, $retval);
21 | $yaml = implode("\n", $output);
22 | $this->assertSpecEquals(file_get_contents($path.'/petstore-simple.yaml'), $yaml);
23 | }
24 |
25 | public function testOutputTofile()
26 | {
27 | $path = __DIR__.'/../Examples/swagger-spec/petstore-simple';
28 | $filename = sys_get_temp_dir().'/swagger-php-clitest.yaml';
29 | exec(__DIR__.'/../bin/openapi --format yaml -o '.escapeshellarg($filename).' '.escapeshellarg($path).' 2> /dev/null', $output, $retval);
30 | $this->assertSame(0, $retval);
31 | $this->assertCount(0, $output, 'No output to stdout');
32 | $yaml = file_get_contents($filename);
33 | unlink($filename);
34 | $this->assertSpecEquals(file_get_contents($path.'/petstore-simple.yaml'), $yaml);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/api/vendor/symfony/finder/Iterator/FilenameFilterIterator.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Finder\Iterator;
13 |
14 | use Symfony\Component\Finder\Glob;
15 |
16 | /**
17 | * FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
18 | *
19 | * @author Fabien Potencier
20 | */
21 | class FilenameFilterIterator extends MultiplePcreFilterIterator
22 | {
23 | /**
24 | * Filters the iterator values.
25 | *
26 | * @return bool true if the value should be kept, false otherwise
27 | */
28 | public function accept()
29 | {
30 | return $this->isAccepted($this->current()->getFilename());
31 | }
32 |
33 | /**
34 | * Converts glob to regexp.
35 | *
36 | * PCRE patterns are left unchanged.
37 | * Glob strings are transformed with Glob::toRegex().
38 | *
39 | * @param string $str Pattern: glob or regexp
40 | *
41 | * @return string regexp corresponding to a given glob or regexp
42 | */
43 | protected function toRegex(string $str)
44 | {
45 | return $this->isRegex($str) ? $str : Glob::toRegex($str);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Processors/InheritTraits.php:
--------------------------------------------------------------------------------
1 | getAnnotationsOfType(Schema::class);
18 | foreach ($schemas as $schema) {
19 | if ($schema->_context->is('class') || $schema->_context->is('trait')) {
20 | $source = $schema->_context->class ?: $schema->_context->trait;
21 | $traits = $analysis->getTraitsOfClass($schema->_context->fullyQualifiedName($source), true);
22 | foreach ($traits as $trait) {
23 | if ($analysis->getSchemaForSource($trait['context']->fullyQualifiedName($trait['trait']))) {
24 | if ($schema->allOf === UNDEFINED) {
25 | $schema->allOf = [];
26 | }
27 | $schema->allOf[] = new Schema([
28 | '_context' => $trait['context']->_context,
29 | 'ref' => Components::SCHEMA_REF.$trait['trait'],
30 | ]);
31 | }
32 | }
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Processors/AugmentOperationTest.php:
--------------------------------------------------------------------------------
1 | analysisFromFixtures('UsingPhpDoc.php');
19 | $analysis->process(
20 | [
21 | new AugmentOperations(),
22 | ]
23 | );
24 | $operations = $analysis->getAnnotationsOfType(Operation::class);
25 |
26 | $this->assertSame('api/test1', $operations[0]->path);
27 | $this->assertSame('Example summary', $operations[0]->summary, 'Operation summary should be taken from phpDoc');
28 | $this->assertSame("Example description...\nMore description...", $operations[0]->description, 'Operation description should be taken from phpDoc');
29 |
30 | $this->assertSame('api/test2', $operations[1]->path);
31 | $this->assertSame('Example summary', $operations[1]->summary, 'Operation summary should be taken from phpDoc');
32 | $this->assertSame(UNDEFINED, $operations[1]->description, 'This operation only has summary in the phpDoc, no description');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/api/v1/pages/read.php:
--------------------------------------------------------------------------------
1 | getConnection();
10 |
11 | $items = new Pages($db);
12 |
13 | $stmt = $items->read($_POST['authorization']);
14 | if($stmt):
15 | $itemCount = $stmt->rowCount();
16 |
17 | if($itemCount > 0):
18 | http_response_code(200);
19 | $arr = array();
20 | $arr['response'] = array();
21 | $arr['count'] = $itemCount;
22 |
23 | while ($row = $stmt->fetch(PDO::FETCH_ASSOC)):
24 | $e = $row;
25 | array_push($arr['response'], $e);
26 | endwhile;
27 | echo json_encode($arr);
28 | else:
29 | http_response_code(404);
30 | echo json_encode(
31 | array(
32 | "type"=>"danger",
33 | "title"=>"Failed",
34 | "message"=>"No records found."
35 | )
36 | );
37 | endif;
38 | else:
39 | http_response_code(404);
40 | echo json_encode(
41 | array(
42 | "type"=>"danger",
43 | "title"=>"Failed",
44 | "message"=>"Your token did not match the expected token. Please contact an administrator."
45 | )
46 | );
47 | endif;
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Annotations/Tag.php:
--------------------------------------------------------------------------------
1 | 'string',
47 | 'description' => 'string',
48 | ];
49 |
50 | /**
51 | * {@inheritdoc}
52 | */
53 | public static $_parents = [
54 | OpenApi::class,
55 | ];
56 |
57 | /**
58 | * {@inheritdoc}
59 | */
60 | public static $_nested = [
61 | ExternalDocumentation::class => 'externalDocs',
62 | ];
63 | }
64 |
--------------------------------------------------------------------------------
/api/v1/pages/single.php:
--------------------------------------------------------------------------------
1 | getConnection();
10 |
11 | $item = new Pages($db);
12 |
13 | $stmt = $item->single($_POST['slug'], $_POST['authorization']);
14 | if($stmt):
15 | $itemCount = $stmt->rowCount();
16 |
17 | if($itemCount > 0):
18 | http_response_code(200);
19 | $arr = array();
20 | $arr['response'] = array();
21 | $arr['count'] = $itemCount;
22 |
23 | while ($row = $stmt->fetch(PDO::FETCH_ASSOC)):
24 | $e = $row;
25 | array_push($arr['response'], $e);
26 | endwhile;
27 | echo json_encode($arr);
28 | else:
29 | http_response_code(404);
30 | echo json_encode(
31 | array(
32 | "type"=>"danger",
33 | "title"=>"Failed",
34 | "message"=>"No record found."
35 | )
36 | );
37 | endif;
38 | else:
39 | http_response_code(404);
40 | echo json_encode(
41 | array(
42 | "type"=>"danger",
43 | "title"=>"Failed",
44 | "message"=>"Your token did not match the expected token. Please contact an administrator."
45 | )
46 | );
47 | endif;
--------------------------------------------------------------------------------
/api/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Required.php:
--------------------------------------------------------------------------------
1 | .
19 | */
20 |
21 | namespace Doctrine\Common\Annotations\Annotation;
22 |
23 | /**
24 | * Annotation that can be used to signal to the parser
25 | * to check if that attribute is required during the parsing process.
26 | *
27 | * @author Fabio B. Silva
28 | *
29 | * @Annotation
30 | */
31 | final class Required
32 | {
33 | }
34 |
--------------------------------------------------------------------------------
/api/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Finder\Iterator;
13 |
14 | /**
15 | * DepthRangeFilterIterator limits the directory depth.
16 | *
17 | * @author Fabien Potencier
18 | */
19 | class DepthRangeFilterIterator extends \FilterIterator
20 | {
21 | private $minDepth = 0;
22 |
23 | /**
24 | * @param \RecursiveIteratorIterator $iterator The Iterator to filter
25 | * @param int $minDepth The min depth
26 | * @param int $maxDepth The max depth
27 | */
28 | public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth = 0, int $maxDepth = PHP_INT_MAX)
29 | {
30 | $this->minDepth = $minDepth;
31 | $iterator->setMaxDepth(PHP_INT_MAX === $maxDepth ? -1 : $maxDepth);
32 |
33 | parent::__construct($iterator);
34 | }
35 |
36 | /**
37 | * Filters the iterator values.
38 | *
39 | * @return bool true if the value should be kept, false otherwise
40 | */
41 | public function accept()
42 | {
43 | return $this->getInnerIterator()->getDepth() >= $this->minDepth;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/api/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attributes.php:
--------------------------------------------------------------------------------
1 | .
19 | */
20 |
21 | namespace Doctrine\Common\Annotations\Annotation;
22 |
23 | /**
24 | * Annotation that can be used to signal to the parser
25 | * to check the types of all declared attributes during the parsing process.
26 | *
27 | * @author Fabio B. Silva
28 | *
29 | * @Annotation
30 | */
31 | final class Attributes
32 | {
33 | /**
34 | * @var array
35 | */
36 | public $value;
37 | }
38 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/petstore-3.0/api.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Finder\Iterator;
13 |
14 | /**
15 | * FileTypeFilterIterator only keeps files, directories, or both.
16 | *
17 | * @author Fabien Potencier
18 | */
19 | class FileTypeFilterIterator extends \FilterIterator
20 | {
21 | const ONLY_FILES = 1;
22 | const ONLY_DIRECTORIES = 2;
23 |
24 | private $mode;
25 |
26 | /**
27 | * @param \Iterator $iterator The Iterator to filter
28 | * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
29 | */
30 | public function __construct(\Iterator $iterator, int $mode)
31 | {
32 | $this->mode = $mode;
33 |
34 | parent::__construct($iterator);
35 | }
36 |
37 | /**
38 | * Filters the iterator values.
39 | *
40 | * @return bool true if the value should be kept, false otherwise
41 | */
42 | public function accept()
43 | {
44 | $fileinfo = $this->current();
45 | if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) {
46 | return false;
47 | } elseif (self::ONLY_FILES === (self::ONLY_FILES & $this->mode) && $fileinfo->isDir()) {
48 | return false;
49 | }
50 |
51 | return true;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Live Server
8 |
9 |
10 |
11 |
12 |
13 |
23 |
24 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/api/vendor/firebase/php-jwt/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011, Neuman Vong
2 |
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 |
11 | * Redistributions in binary form must reproduce the above
12 | copyright notice, this list of conditions and the following
13 | disclaimer in the documentation and/or other materials provided
14 | with the distribution.
15 |
16 | * Neither the name of Neuman Vong nor the names of other
17 | contributors may be used to endorse or promote products derived
18 | from this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/using-refs/ProductController.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Finder\Comparator;
13 |
14 | /**
15 | * DateCompare compiles date comparisons.
16 | *
17 | * @author Fabien Potencier
18 | */
19 | class DateComparator extends Comparator
20 | {
21 | /**
22 | * @param string $test A comparison string
23 | *
24 | * @throws \InvalidArgumentException If the test is not understood
25 | */
26 | public function __construct(string $test)
27 | {
28 | if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) {
29 | throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test));
30 | }
31 |
32 | try {
33 | $date = new \DateTime($matches[2]);
34 | $target = $date->format('U');
35 | } catch (\Exception $e) {
36 | throw new \InvalidArgumentException(sprintf('"%s" is not a valid date.', $matches[2]));
37 | }
38 |
39 | $operator = isset($matches[1]) ? $matches[1] : '==';
40 | if ('since' === $operator || 'after' === $operator) {
41 | $operator = '>';
42 | }
43 |
44 | if ('until' === $operator || 'before' === $operator) {
45 | $operator = '<';
46 | }
47 |
48 | $this->setOperator($operator);
49 | $this->setTarget($target);
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/api/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation/Attribute.php:
--------------------------------------------------------------------------------
1 | .
19 | */
20 |
21 | namespace Doctrine\Common\Annotations\Annotation;
22 |
23 | /**
24 | * Annotation that can be used to signal to the parser
25 | * to check the attribute type during the parsing process.
26 | *
27 | * @author Fabio B. Silva
28 | *
29 | * @Annotation
30 | */
31 | final class Attribute
32 | {
33 | /**
34 | * @var string
35 | */
36 | public $name;
37 |
38 | /**
39 | * @var string
40 | */
41 | public $type;
42 |
43 | /**
44 | * @var boolean
45 | */
46 | public $required = false;
47 | }
48 |
--------------------------------------------------------------------------------
/api/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Finder\Iterator;
13 |
14 | use Symfony\Component\Finder\Comparator\NumberComparator;
15 |
16 | /**
17 | * SizeRangeFilterIterator filters out files that are not in the given size range.
18 | *
19 | * @author Fabien Potencier
20 | */
21 | class SizeRangeFilterIterator extends \FilterIterator
22 | {
23 | private $comparators = [];
24 |
25 | /**
26 | * @param \Iterator $iterator The Iterator to filter
27 | * @param NumberComparator[] $comparators An array of NumberComparator instances
28 | */
29 | public function __construct(\Iterator $iterator, array $comparators)
30 | {
31 | $this->comparators = $comparators;
32 |
33 | parent::__construct($iterator);
34 | }
35 |
36 | /**
37 | * Filters the iterator values.
38 | *
39 | * @return bool true if the value should be kept, false otherwise
40 | */
41 | public function accept()
42 | {
43 | $fileinfo = $this->current();
44 | if (!$fileinfo->isFile()) {
45 | return true;
46 | }
47 |
48 | $filesize = $fileinfo->getSize();
49 | foreach ($this->comparators as $compare) {
50 | if (!$compare->test($filesize)) {
51 | return false;
52 | }
53 | }
54 |
55 | return true;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/api/documentation/swagger/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Swagger UI
7 |
8 |
9 |
10 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/api/vendor/doctrine/annotations/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "doctrine/annotations",
3 | "type": "library",
4 | "description": "Docblock Annotations Parser",
5 | "keywords": ["annotations", "docblock", "parser"],
6 | "homepage": "http://www.doctrine-project.org",
7 | "license": "MIT",
8 | "authors": [
9 | {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
10 | {"name": "Roman Borschel", "email": "roman@code-factory.org"},
11 | {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"},
12 | {"name": "Jonathan Wage", "email": "jonwage@gmail.com"},
13 | {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}
14 | ],
15 | "require": {
16 | "php": "^7.1 || ^8.0",
17 | "ext-tokenizer": "*",
18 | "doctrine/lexer": "1.*"
19 | },
20 | "require-dev": {
21 | "doctrine/cache": "1.*",
22 | "phpstan/phpstan": "^0.12.20",
23 | "phpunit/phpunit": "^7.5 || ^9.1.5"
24 | },
25 | "config": {
26 | "sort-packages": true
27 | },
28 | "autoload": {
29 | "psr-4": { "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" }
30 | },
31 | "autoload-dev": {
32 | "psr-4": {
33 | "Doctrine\\Performance\\Common\\Annotations\\": "tests/Doctrine/Performance/Common/Annotations",
34 | "Doctrine\\Tests\\Common\\Annotations\\": "tests/Doctrine/Tests/Common/Annotations"
35 | },
36 | "files": [
37 | "tests/Doctrine/Tests/Common/Annotations/Fixtures/SingleClassLOC1000.php"
38 | ]
39 | },
40 | "extra": {
41 | "branch-alias": {
42 | "dev-master": "1.9.x-dev"
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/api/vendor/symfony/finder/Iterator/PathFilterIterator.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Finder\Iterator;
13 |
14 | /**
15 | * PathFilterIterator filters files by path patterns (e.g. some/special/dir).
16 | *
17 | * @author Fabien Potencier
18 | * @author Włodzimierz Gajda
19 | */
20 | class PathFilterIterator extends MultiplePcreFilterIterator
21 | {
22 | /**
23 | * Filters the iterator values.
24 | *
25 | * @return bool true if the value should be kept, false otherwise
26 | */
27 | public function accept()
28 | {
29 | $filename = $this->current()->getRelativePathname();
30 |
31 | if ('\\' === \DIRECTORY_SEPARATOR) {
32 | $filename = str_replace('\\', '/', $filename);
33 | }
34 |
35 | return $this->isAccepted($filename);
36 | }
37 |
38 | /**
39 | * Converts strings to regexp.
40 | *
41 | * PCRE patterns are left unchanged.
42 | *
43 | * Default conversion:
44 | * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/'
45 | *
46 | * Use only / as directory separator (on Windows also).
47 | *
48 | * @param string $str Pattern: regexp or dirname
49 | *
50 | * @return string regexp corresponding to a given string or regexp
51 | */
52 | protected function toRegex(string $str)
53 | {
54 | return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/api/vendor/symfony/polyfill-ctype/bootstrap.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | use Symfony\Polyfill\Ctype as p;
13 |
14 | if (!function_exists('ctype_alnum')) {
15 | function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
16 | }
17 | if (!function_exists('ctype_alpha')) {
18 | function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
19 | }
20 | if (!function_exists('ctype_cntrl')) {
21 | function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
22 | }
23 | if (!function_exists('ctype_digit')) {
24 | function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
25 | }
26 | if (!function_exists('ctype_graph')) {
27 | function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
28 | }
29 | if (!function_exists('ctype_lower')) {
30 | function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
31 | }
32 | if (!function_exists('ctype_print')) {
33 | function ctype_print($text) { return p\Ctype::ctype_print($text); }
34 | }
35 | if (!function_exists('ctype_punct')) {
36 | function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
37 | }
38 | if (!function_exists('ctype_space')) {
39 | function ctype_space($text) { return p\Ctype::ctype_space($text); }
40 | }
41 | if (!function_exists('ctype_upper')) {
42 | function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
43 | }
44 | if (!function_exists('ctype_xdigit')) {
45 | function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
46 | }
47 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Fixtures/CustomerInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Finder\Iterator;
13 |
14 | use Symfony\Component\Finder\Comparator\DateComparator;
15 |
16 | /**
17 | * DateRangeFilterIterator filters out files that are not in the given date range (last modified dates).
18 | *
19 | * @author Fabien Potencier
20 | */
21 | class DateRangeFilterIterator extends \FilterIterator
22 | {
23 | private $comparators = [];
24 |
25 | /**
26 | * @param \Iterator $iterator The Iterator to filter
27 | * @param DateComparator[] $comparators An array of DateComparator instances
28 | */
29 | public function __construct(\Iterator $iterator, array $comparators)
30 | {
31 | $this->comparators = $comparators;
32 |
33 | parent::__construct($iterator);
34 | }
35 |
36 | /**
37 | * Filters the iterator values.
38 | *
39 | * @return bool true if the value should be kept, false otherwise
40 | */
41 | public function accept()
42 | {
43 | $fileinfo = $this->current();
44 |
45 | if (!file_exists($fileinfo->getPathname())) {
46 | return false;
47 | }
48 |
49 | $filedate = $fileinfo->getMTime();
50 | foreach ($this->comparators as $compare) {
51 | if (!$compare->test($filedate)) {
52 | return false;
53 | }
54 | }
55 |
56 | return true;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/api/vendor/symfony/finder/Iterator/FilecontentFilterIterator.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Finder\Iterator;
13 |
14 | /**
15 | * FilecontentFilterIterator filters files by their contents using patterns (regexps or strings).
16 | *
17 | * @author Fabien Potencier
18 | * @author Włodzimierz Gajda
19 | */
20 | class FilecontentFilterIterator extends MultiplePcreFilterIterator
21 | {
22 | /**
23 | * Filters the iterator values.
24 | *
25 | * @return bool true if the value should be kept, false otherwise
26 | */
27 | public function accept()
28 | {
29 | if (!$this->matchRegexps && !$this->noMatchRegexps) {
30 | return true;
31 | }
32 |
33 | $fileinfo = $this->current();
34 |
35 | if ($fileinfo->isDir() || !$fileinfo->isReadable()) {
36 | return false;
37 | }
38 |
39 | $content = $fileinfo->getContents();
40 | if (!$content) {
41 | return false;
42 | }
43 |
44 | return $this->isAccepted($content);
45 | }
46 |
47 | /**
48 | * Converts string to regexp if necessary.
49 | *
50 | * @param string $str Pattern: string or regexp
51 | *
52 | * @return string regexp corresponding to a given string or regexp
53 | */
54 | protected function toRegex(string $str)
55 | {
56 | return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Annotations/ExternalDocumentation.php:
--------------------------------------------------------------------------------
1 | 'string',
36 | 'url' => 'string',
37 | ];
38 |
39 | /**
40 | * {@inheritdoc}
41 | */
42 | public static $_required = ['url'];
43 |
44 | /**
45 | * {@inheritdoc}
46 | */
47 | public static $_parents = [
48 | OpenApi::class,
49 | Tag::class,
50 | Schema::class,
51 | AdditionalProperties::class,
52 | Property::class,
53 | Operation::class,
54 | Get::class,
55 | Post::class,
56 | Put::class,
57 | Delete::class,
58 | Patch::class,
59 | Head::class,
60 | Options::class,
61 | Trace::class,
62 | Items::class,
63 | JsonContent::class,
64 | XmlContent::class,
65 | ];
66 | }
67 |
--------------------------------------------------------------------------------
/api/documentation/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Swagger UI
7 |
8 |
9 |
10 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Processors/OperationIdTest.php:
--------------------------------------------------------------------------------
1 | analysisFromFixtures([
21 | 'Processors/EntityControllerClass.php',
22 | 'Processors/EntityControllerInterface.php',
23 | 'Processors/EntityControllerTrait.php',
24 | ]);
25 | $analysis->process([new OperationId()]);
26 | $operations = $analysis->getAnnotationsOfType(Operation::class);
27 |
28 | $this->assertCount(3, $operations);
29 |
30 | $this->assertSame('entity/{id}', $operations[0]->path);
31 | $this->assertInstanceOf(Get::class, $operations[0]);
32 | $this->assertSame('OpenApi\Tests\Fixtures\Processors\EntityControllerClass::getEntry', $operations[0]->operationId);
33 |
34 | $this->assertSame('entity/{id}', $operations[1]->path);
35 | $this->assertInstanceOf(Post::class, $operations[1]);
36 | $this->assertSame('OpenApi\Tests\Fixtures\Processors\EntityControllerInterface::updateEntity', $operations[1]->operationId);
37 |
38 | $this->assertSame('entities/{id}', $operations[2]->path);
39 | $this->assertInstanceOf(Delete::class, $operations[2]);
40 | $this->assertSame('OpenApi\Tests\Fixtures\Processors\EntityControllerTrait::deleteEntity', $operations[2]->operationId);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/api/vendor/symfony/finder/Iterator/CustomFilterIterator.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Finder\Iterator;
13 |
14 | /**
15 | * CustomFilterIterator filters files by applying anonymous functions.
16 | *
17 | * The anonymous function receives a \SplFileInfo and must return false
18 | * to remove files.
19 | *
20 | * @author Fabien Potencier
21 | */
22 | class CustomFilterIterator extends \FilterIterator
23 | {
24 | private $filters = [];
25 |
26 | /**
27 | * @param \Iterator $iterator The Iterator to filter
28 | * @param callable[] $filters An array of PHP callbacks
29 | *
30 | * @throws \InvalidArgumentException
31 | */
32 | public function __construct(\Iterator $iterator, array $filters)
33 | {
34 | foreach ($filters as $filter) {
35 | if (!\is_callable($filter)) {
36 | throw new \InvalidArgumentException('Invalid PHP callback.');
37 | }
38 | }
39 | $this->filters = $filters;
40 |
41 | parent::__construct($iterator);
42 | }
43 |
44 | /**
45 | * Filters the iterator values.
46 | *
47 | * @return bool true if the value should be kept, false otherwise
48 | */
49 | public function accept()
50 | {
51 | $fileinfo = $this->current();
52 |
53 | foreach ($this->filters as $filter) {
54 | if (false === $filter($fileinfo)) {
55 | return false;
56 | }
57 | }
58 |
59 | return true;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Annotations/ValidateRelationsTest.php:
--------------------------------------------------------------------------------
1 | fail($class.' not found in '.$parent."::\$_nested. Found:\n ".implode("\n ", array_keys($parent::$_nested)));
33 | }
34 | }
35 | }
36 |
37 | /**
38 | * @dataProvider allAnnotationClasses
39 | *
40 | * @param string $class
41 | */
42 | public function testNested($class)
43 | {
44 | foreach (array_keys($class::$_nested) as $nested) {
45 | $found = false;
46 | foreach ($nested::$_parents as $parent) {
47 | if ($parent === $class) {
48 | $found = true;
49 | break;
50 | }
51 | }
52 | if ($found === false) {
53 | $this->fail($class.' not found in '.$nested."::\$parent. Found:\n ".implode("\n ", $nested::$_parents));
54 | }
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Annotations/Discriminator.php:
--------------------------------------------------------------------------------
1 | 'string',
45 | ];
46 |
47 | /**
48 | * {@inheritdoc}
49 | */
50 | public static $_parents = [
51 | Schema::class,
52 | Property::class,
53 | AdditionalProperties::class,
54 | Items::class,
55 | JsonContent::class,
56 | XmlContent::class,
57 | ];
58 | }
59 |
--------------------------------------------------------------------------------
/js/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | var app = {
20 | // Application Constructor
21 | initialize: function() {
22 | document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
23 | },
24 |
25 | // deviceready Event Handler
26 | //
27 | // Bind any cordova events here. Common events are:
28 | // 'pause', 'resume', etc.
29 | onDeviceReady: function() {
30 | this.receivedEvent('deviceready');
31 | },
32 |
33 | // Update DOM on a Received Event
34 | receivedEvent: function(id) {
35 | var parentElement = document.getElementById(id);
36 | var listeningElement = parentElement.querySelector('.listening');
37 | var receivedElement = parentElement.querySelector('.received');
38 |
39 | listeningElement.setAttribute('style', 'display:none;');
40 | receivedElement.setAttribute('style', 'display:block;');
41 |
42 | console.log('Received Event: ' + id);
43 | }
44 | };
45 |
46 | app.initialize();
--------------------------------------------------------------------------------
/live.sql:
--------------------------------------------------------------------------------
1 | -- phpMyAdmin SQL Dump
2 | -- version 4.9.2
3 | -- https://www.phpmyadmin.net/
4 | --
5 | -- Host: 127.0.0.1:3308
6 | -- Generation Time: Dec 23, 2020 at 12:01 AM
7 | -- Server version: 8.0.18
8 | -- PHP Version: 7.2.25
9 |
10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11 | SET AUTOCOMMIT = 0;
12 | START TRANSACTION;
13 | SET time_zone = "+00:00";
14 |
15 |
16 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
17 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
18 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
19 | /*!40101 SET NAMES utf8mb4 */;
20 |
21 | --
22 | -- Database: `live`
23 | --
24 |
25 | -- --------------------------------------------------------
26 |
27 | --
28 | -- Table structure for table `pages`
29 | --
30 |
31 | DROP TABLE IF EXISTS `pages`;
32 | CREATE TABLE IF NOT EXISTS `pages` (
33 | `id` int(11) NOT NULL AUTO_INCREMENT,
34 | `orderid` int(11) NOT NULL,
35 | `slug` varchar(100) NOT NULL,
36 | `title` varchar(100) NOT NULL,
37 | `content` text NOT NULL,
38 | PRIMARY KEY (`id`)
39 | ) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
40 |
41 | --
42 | -- Dumping data for table `pages`
43 | --
44 |
45 | INSERT INTO `pages` (`id`, `orderid`, `slug`, `title`, `content`) VALUES
46 | (1, 1, '', 'Home', 'This is the home page.
'),
47 | (2, 2, 'about', 'About Us', 'This is the about us page.
'),
48 | (3, 3, 'contact', 'Contact Us', 'This is the contact us page.
'),
49 | (4, 4, 'services', 'Services', 'This is the services page.
\r\n\r\n- Service One
\r\n- Service Two
\r\n
');
50 | COMMIT;
51 |
52 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
53 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
54 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
55 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "zircote/swagger-php",
3 | "type": "library",
4 | "license": "Apache-2.0",
5 | "bin": [
6 | "bin/openapi"
7 | ],
8 | "description": "swagger-php - Generate interactive documentation for your RESTful API using phpdoc annotations",
9 | "keywords": [
10 | "json",
11 | "rest",
12 | "api",
13 | "service discovery"
14 | ],
15 | "homepage": "https://github.com/zircote/swagger-php/",
16 | "authors": [
17 | {
18 | "name": "Robert Allen",
19 | "email": "zircote@gmail.com",
20 | "homepage": "http://www.zircote.com"
21 | },
22 | {
23 | "name": "Bob Fanger",
24 | "email": "bfanger@gmail.com",
25 | "homepage": "http://bfanger.nl"
26 | }
27 | ],
28 | "config": {
29 | "bin-dir": "bin",
30 | "sort-packages": true
31 | },
32 | "minimum-stability": "stable",
33 | "require": {
34 | "php": ">=7.2",
35 | "ext-json": "*",
36 | "doctrine/annotations": "*",
37 | "symfony/finder": ">=2.2",
38 | "symfony/yaml": ">=3.3"
39 | },
40 | "autoload": {
41 | "psr-4": {
42 | "OpenApi\\": "src"
43 | },
44 | "files": [
45 | "src/functions.php"
46 | ]
47 | },
48 | "require-dev": {
49 | "friendsofphp/php-cs-fixer": "^2.16",
50 | "phpunit/phpunit": ">=8"
51 | },
52 | "autoload-dev": {
53 | "psr-4": {
54 | "OpenApi\\Tests\\": "tests/",
55 | "AnotherNamespace\\": "tests/Fixtures/AnotherNamespace"
56 | }
57 | },
58 | "scripts": {
59 | "cs": "php-cs-fixer fix --allow-risky=yes",
60 | "lint": "@cs --dry-run",
61 | "test": ["phpunit", "@lint"],
62 | "docs": "vuepress dev docs/",
63 | "deploy_docs": "vuepress build docs/ && cp -r .git docs/.vuepress/dist/.git && cd docs/.vuepress/dist/ && git symbolic-ref HEAD refs/heads/gh-pages && git add --all"
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/docs/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | home: true
3 | actionText: Get Started →
4 | actionLink: /Getting-started
5 | features:
6 | - title: OpenAPI specification
7 | details: Compatible with the OpenAPI Specification version 3.
8 | formerly known as Swagger.
9 | - title: Use @Annotations
10 | details: Write the documentation inside the php source files which helps to keep the documentation in sync.
11 | - title: Useful error messages
12 | details: Enhanced errors messages with hints and context.
13 | ---
14 |
15 | Install with composer:
16 |
17 | ```bash
18 | composer require zircote/swagger-php
19 | ```
20 |
21 | Create a php file:
22 |
23 | ```php
24 | toYaml();
29 | ```
30 |
31 | Add annotations to your php files.
32 |
33 | ```php
34 | /**
35 | * @OA\Info(title="My First API", version="0.1")
36 | */
37 |
38 | /**
39 | * @OA\Get(
40 | * path="/api/resource.json",
41 | * @OA\Response(response="200", description="An example resource")
42 | * )
43 | */
44 | ```
45 |
46 | And view and interact with your API using [Swagger UI ](https://swagger.io/tools/swagger-ui/)
47 |
48 | ## Links
49 |
50 | - [Getting started guide](Getting-started.md)
51 | - [OpenApi Documentation](https://swagger.io/docs/)
52 | - [OpenApi Specification](http://swagger.io/specification/)
53 | - [Migration from 2.x to 3.x](Migrating-to-v3.md)
54 | - [Learn by example](https://github.com/zircote/swagger-php/tree/master/Examples) lots of example of how to generate
55 | - [Related projects](Related-projects.md)
56 | - [Swagger-php 2.x documentation](https://github.com/zircote/swagger-php/tree/2.x/docs) The docs for swagger-php v2
57 | - [Swagger-php 1.x documentation](/1.x/) The docs for swagger-php v1
58 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Processors/BuildPathsTest.php:
--------------------------------------------------------------------------------
1 | paths = [
25 | new PathItem(['path' => '/comments']),
26 | new PathItem(['path' => '/comments']),
27 | ];
28 | $analysis = new Analysis([$openapi]);
29 | $analysis->openapi = $openapi;
30 | $analysis->process(new BuildPaths());
31 | $this->assertCount(1, $openapi->paths);
32 | $this->assertSame('/comments', $openapi->paths[0]->path);
33 | }
34 |
35 | public function testMergeOperationsWithSamePath()
36 | {
37 | $openapi = new OpenApi([]);
38 | $analysis = new Analysis(
39 | [
40 | $openapi,
41 | new Get(['path' => '/comments']),
42 | new Post(['path' => '/comments']),
43 | ]
44 | );
45 | $analysis->process(new MergeIntoOpenApi());
46 | $analysis->process(new BuildPaths());
47 | $this->assertCount(1, $openapi->paths);
48 | $path = $openapi->paths[0];
49 | $this->assertSame('/comments', $path->path);
50 | $this->assertInstanceOf(PathItem::class, $path);
51 | $this->assertInstanceOf(Get::class, $path->get);
52 | $this->assertInstanceOf(Post::class, $path->post);
53 | $this->assertSame(UNDEFINED, $path->put);
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/Examples/petstore-3.0/models/Pet.php:
--------------------------------------------------------------------------------
1 |
15 | *
16 | * @OA\Schema(
17 | * description="Pet model",
18 | * title="Pet model",
19 | * required={"name", "photoUrls"},
20 | * @OA\Xml(
21 | * name="Pet"
22 | * )
23 | * )
24 | */
25 | class Pet
26 | {
27 |
28 | /**
29 | * @OA\Property(
30 | * format="int64",
31 | * description="ID",
32 | * title="ID",
33 | * )
34 | *
35 | * @var integer
36 | */
37 | private $id;
38 |
39 | /**
40 | * @OA\Property(
41 | * description="Category relation",
42 | * title="Category",
43 | * )
44 | *
45 | * @var \Petstore30\Category
46 | */
47 | private $category;
48 |
49 | /**
50 | * @OA\Property(
51 | * format="int64",
52 | * description="Pet name",
53 | * title="Pet name",
54 | * )
55 | *
56 | * @var integer
57 | */
58 | private $name;
59 |
60 | /**
61 | * @OA\Property(
62 | * description="Photo urls",
63 | * title="Photo urls",
64 | * @OA\Xml(
65 | * name="photoUrl",
66 | * wrapped=true
67 | * ),
68 | * @OA\Items(
69 | * type="string",
70 | * default="images/image-1.png"
71 | * )
72 | * )
73 | *
74 | * @var array
75 | */
76 | private $photoUrls;
77 |
78 | /**
79 | * @OA\Property(
80 | * description="Pet tags",
81 | * title="Pet tags",
82 | * @OA\Xml(
83 | * name="tag",
84 | * wrapped=true
85 | * ),
86 | * )
87 | *
88 | * @var \Petstore30\Tag[]
89 | */
90 | private $tags;
91 | }
92 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Processors/MergeInterfaces.php:
--------------------------------------------------------------------------------
1 | getAnnotationsOfType(Schema::class);
19 | foreach ($schemas as $schema) {
20 | if ($schema->_context->is('class')) {
21 | $existing = [];
22 | $interfaces = $analysis->getInterfacesOfClass($schema->_context->fullyQualifiedName($schema->_context->class));
23 | foreach ($interfaces as $interface) {
24 | foreach ($interface['context']->annotations as $annotation) {
25 | if ($annotation instanceof Property && !in_array($annotation->_context->property, $existing)) {
26 | $existing[] = $annotation->_context->property;
27 | $schema->merge([$annotation], true);
28 | }
29 | }
30 |
31 | foreach ($interface['methods'] as $method) {
32 | if (is_array($method->annotations) || $method->annotations instanceof Traversable) {
33 | foreach ($method->annotations as $annotation) {
34 | if ($annotation instanceof Property && !in_array($annotation->_context->property, $existing)) {
35 | $existing[] = $annotation->_context->property;
36 | $schema->merge([$annotation], true);
37 | }
38 | }
39 | }
40 | }
41 | }
42 | }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Annotations/OperationTest.php:
--------------------------------------------------------------------------------
1 | [
18 | [],
19 | '/** @OA\Get(security={ }) */',
20 | '{"security":[]}',
21 | ],
22 | 'basic' => [
23 | [['api_key' => []]],
24 | '/** @OA\Get(security={ {"api_key":{}} }) */',
25 | '{"security":[{"api_key":[]}]}',
26 | ],
27 | 'optional' => [
28 | [[]],
29 | '/** @OA\Get(security={ {} }) */',
30 | '{"security":[{}]}',
31 | ],
32 | 'optional-oauth2' => [
33 | [[], ['petstore_auth' => ['write:pets', 'read:pets']]],
34 | '/** @OA\Get(security={ {}, {"petstore_auth":{"write:pets","read:pets"}} }) */',
35 | '{"security":[{},{"petstore_auth":["write:pets","read:pets"]}]}',
36 | ],
37 | ];
38 | }
39 |
40 | /**
41 | * @dataProvider securityData
42 | */
43 | public function testSecuritySerialization($security, $dockBlock, $expected)
44 | {
45 | // test with Get implementation...
46 | $operation = new OA\Get([
47 | 'security' => $security,
48 | ]);
49 | $flags = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
50 | $json = $operation->toJson($flags);
51 | $this->assertEquals($expected, $json);
52 |
53 | $analysis = $this->analysisFromDockBlock($dockBlock);
54 | $this->assertCount(1, $analysis);
55 | $json = $analysis[0]->toJson($flags);
56 | $this->assertEquals($expected, $json);
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/docs/Related-projects.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar: false
3 | ---
4 |
5 | # Related projects
6 |
7 | | Project | Description |
8 | | ----------------------------- | --------------------------------------------------------- |
9 | | [Swagger UI][1] | The webinterface for reading the generated documentation |
10 | | [Swagger Explained][2] | Browse the spec by using an swagger.json. |
11 | | [silex2swagger][3] | Generate swagger documentation from Silex Annotations |
12 | | [yii2-swagger][4] | swagger-php intergation with yii2 |
13 | | [Lumen swagger][5] | swagger-php integration with lumen/laravel |
14 | | [NelmioApiDocBundle][6] | Symfony bundle on top of swagger-php |
15 | | [auto-swagger-ui][7] | Automatically add swagger ui and json to your application |
16 | | [openapi-router][8] | Configure framework routes from OpenApi annotations |
17 | | [openapi-verifier][9] | Verify response against OpenAPI specification in PHPUnit |
18 | | [openapi-filter][10] | Filter internal paths, operations, parameters, etc |
19 | | [OpenAPI-Symfony-Routing][11] | Load routes in Symfony based on OpenAPI annotations |
20 |
21 | Is a related project missing? Create a pull request!
22 |
23 | [1]: https://swagger.io/tools/swagger-ui/
24 | [2]: https://bfanger.nl/swagger-explained/
25 | [3]: https://github.com/DerManoMann/silex2swagger
26 | [4]: https://github.com/lichunqiang/yii2-swagger
27 | [5]: https://github.com/DarkaOnLine/SwaggerLumen
28 | [6]: https://github.com/nelmio/NelmioApiDocBundle
29 | [7]: https://github.com/kevupton/auto-swagger-ui
30 | [8]: https://github.com/DerManoMann/openapi-router
31 | [9]: https://github.com/DerManoMann/openapi-verifier
32 | [10]: https://github.com/Mermade/openapi-filter
33 | [11]: https://github.com/Tobion/OpenAPI-Symfony-Routing
34 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/tests/Annotations/NestedPropertyTest.php:
--------------------------------------------------------------------------------
1 | analysisFromFixtures('NestedProperty.php');
21 | $analysis->process(new MergeIntoOpenApi());
22 | $analysis->process(new MergeIntoComponents());
23 | $analysis->process(new AugmentSchemas());
24 | $analysis->process(new AugmentProperties());
25 |
26 | $this->assertCount(1, $analysis->openapi->components->schemas);
27 | $schema = $analysis->openapi->components->schemas[0];
28 | $this->assertEquals('NestedProperty', $schema->schema);
29 | $this->assertCount(1, $schema->properties);
30 |
31 | $parentProperty = $schema->properties[0];
32 | $this->assertEquals('parentProperty', $parentProperty->property);
33 | $this->assertCount(1, $parentProperty->properties);
34 |
35 | $babyProperty = $parentProperty->properties[0];
36 | $this->assertEquals('babyProperty', $babyProperty->property);
37 | $this->assertCount(1, $babyProperty->properties);
38 |
39 | $theBabyOfBaby = $babyProperty->properties[0];
40 | $this->assertEquals('theBabyOfBaby', $theBabyOfBaby->property);
41 | $this->assertCount(1, $theBabyOfBaby->properties);
42 |
43 | // verbose not-recommend notations
44 | $theBabyOfBabyBaby = $theBabyOfBaby->properties[0];
45 | $this->assertEquals('theBabyOfBabyBaby', $theBabyOfBabyBaby->property);
46 | $this->assertSame(UNDEFINED, $theBabyOfBabyBaby->properties);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/api/vendor/zircote/swagger-php/src/Annotations/ServerVariable.php:
--------------------------------------------------------------------------------
1 | variables array.
18 | *
19 | * @var string
20 | */
21 | public $serverVariable = UNDEFINED;
22 |
23 | /**
24 | * An enumeration of string values to be used if the substitution options are from a limited set.
25 | *
26 | * @var string[]
27 | */
28 | public $enum = UNDEFINED;
29 |
30 | /**
31 | * The default value to use for substitution, and to send, if an alternate value is not supplied.
32 | * Unlike the Schema Object's default, this value must be provided by the consumer.
33 | *
34 | * @var string
35 | */
36 | public $default = UNDEFINED;
37 |
38 | /**
39 | * A map between a variable name and its value.
40 | * The value is used for substitution in the server's URL template.
41 | *
42 | * @var array
43 | */
44 | public $variables = UNDEFINED;
45 |
46 | /**
47 | * An optional description for the server variable.
48 | * CommonMark syntax MAY be used for rich text representation.
49 | *
50 | * @var string
51 | */
52 | public $description = UNDEFINED;
53 |
54 | /**
55 | * {@inheritdoc}
56 | */
57 | public static $_parents = [
58 | Server::class,
59 | ];
60 |
61 | /**
62 | * {@inheritdoc}
63 | */
64 | public static $_required = ['default'];
65 |
66 | /**
67 | * {@inheritdoc}
68 | */
69 | public static $_types = [
70 | 'default' => 'string',
71 | 'description' => 'string',
72 | ];
73 | }
74 |
--------------------------------------------------------------------------------