From 2f8f21daf7023dd33bdd59102f46fa703334c162 Mon Sep 17 00:00:00 2001 From: lutangar Date: Sun, 25 Jul 2021 06:13:58 +0000 Subject: [PATCH] Functional php client --- .github/workflows/test.yml | 23 + .gitignore | 17 + .php_cs | 101 + README.md | 144 + composer.json | 54 + composer.lock | 4518 +++++++++++++++++ docs/Api/AuthenticationApi.md | 68 + docs/Api/ContributorApi.md | 68 + docs/Api/MatchingContextApi.md | 253 + docs/Api/NoticeApi.md | 313 ++ docs/Model/ContributorJsonldRead.md | 11 + docs/Model/Credentials.md | 10 + docs/Model/InlineResponse200.md | 12 + docs/Model/InlineResponse2001.md | 12 + docs/Model/InlineResponse200HydraSearch.md | 12 + ...nlineResponse200HydraSearchHydraMapping.md | 12 + docs/Model/InlineResponse200HydraView.md | 14 + docs/Model/MatchingContextCreate.md | 16 + docs/Model/MatchingContextJsonldCreate.md | 19 + docs/Model/MatchingContextJsonldRead.md | 17 + docs/Model/MatchingContextRead.md | 14 + docs/Model/NoticeCreate.md | 13 + docs/Model/NoticeJsonldCreate.md | 16 + docs/Model/NoticeJsonldRead.md | 29 + docs/Model/NoticeRead.md | 26 + docs/Model/Token.md | 9 + model_enum | 17 + model_generic | 248 + partial_header | 11 + php_doc_auth_partial | 4 + phpunit.xml | 23 + src/Api/AuthenticationApi.php | 358 ++ src/Api/ContributorApi.php | 361 ++ src/Api/MatchingContextApi.php | 1100 ++++ src/Api/NoticeApi.php | 1299 +++++ src/ApiException.php | 100 + src/Configuration.php | 480 ++ src/HeaderSelector.php | 92 + src/Model/ContributorJsonldRead.php | 289 ++ src/Model/Credentials.php | 334 ++ src/Model/InlineResponse200.php | 405 ++ src/Model/InlineResponse2001.php | 405 ++ src/Model/InlineResponse200HydraSearch.php | 367 ++ ...lineResponse200HydraSearchHydraMapping.php | 367 ++ src/Model/InlineResponse200HydraView.php | 400 ++ src/Model/MatchingContextCreate.php | 515 ++ src/Model/MatchingContextJsonldCreate.php | 527 ++ src/Model/MatchingContextJsonldRead.php | 469 ++ src/Model/MatchingContextRead.php | 457 ++ src/Model/ModelInterface.php | 82 + src/Model/NoticeCreate.php | 422 ++ src/Model/NoticeJsonldCreate.php | 434 ++ src/Model/NoticeJsonldRead.php | 811 +++ src/Model/NoticeRead.php | 799 +++ src/Model/Token.php | 305 ++ src/ObjectSerializer.php | 383 ++ test/Api/AuthenticationApiTest.php | 70 + test/Api/ContributorApiTest.php | 70 + test/Api/MatchingContextApiTest.php | 103 + test/Api/NoticeApiTest.php | 114 + test/DevServerTest.php | 123 + test/Model/ContributorJsonldReadTest.php | 69 + test/Model/CredentialsTest.php | 87 + test/Model/InlineResponse2001Test.php | 105 + ...Response200HydraSearchHydraMappingTest.php | 96 + .../InlineResponse200HydraSearchTest.php | 96 + test/Model/InlineResponse200HydraViewTest.php | 105 + test/Model/InlineResponse200Test.php | 105 + test/Model/MatchingContextCreateTest.php | 141 + .../Model/MatchingContextJsonldCreateTest.php | 141 + test/Model/MatchingContextJsonldReadTest.php | 123 + test/Model/MatchingContextReadTest.php | 123 + test/Model/NoticeCreateTest.php | 114 + test/Model/NoticeJsonldCreateTest.php | 114 + test/Model/NoticeJsonldReadTest.php | 231 + test/Model/NoticeReadTest.php | 231 + test/Model/TokenTest.php | 78 + 77 files changed, 20104 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 .php_cs create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 docs/Api/AuthenticationApi.md create mode 100644 docs/Api/ContributorApi.md create mode 100644 docs/Api/MatchingContextApi.md create mode 100644 docs/Api/NoticeApi.md create mode 100644 docs/Model/ContributorJsonldRead.md create mode 100644 docs/Model/Credentials.md create mode 100644 docs/Model/InlineResponse200.md create mode 100644 docs/Model/InlineResponse2001.md create mode 100644 docs/Model/InlineResponse200HydraSearch.md create mode 100644 docs/Model/InlineResponse200HydraSearchHydraMapping.md create mode 100644 docs/Model/InlineResponse200HydraView.md create mode 100644 docs/Model/MatchingContextCreate.md create mode 100644 docs/Model/MatchingContextJsonldCreate.md create mode 100644 docs/Model/MatchingContextJsonldRead.md create mode 100644 docs/Model/MatchingContextRead.md create mode 100644 docs/Model/NoticeCreate.md create mode 100644 docs/Model/NoticeJsonldCreate.md create mode 100644 docs/Model/NoticeJsonldRead.md create mode 100644 docs/Model/NoticeRead.md create mode 100644 docs/Model/Token.md create mode 100644 model_enum create mode 100644 model_generic create mode 100644 partial_header create mode 100644 php_doc_auth_partial create mode 100644 phpunit.xml create mode 100644 src/Api/AuthenticationApi.php create mode 100644 src/Api/ContributorApi.php create mode 100644 src/Api/MatchingContextApi.php create mode 100644 src/Api/NoticeApi.php create mode 100644 src/ApiException.php create mode 100644 src/Configuration.php create mode 100644 src/HeaderSelector.php create mode 100644 src/Model/ContributorJsonldRead.php create mode 100644 src/Model/Credentials.php create mode 100644 src/Model/InlineResponse200.php create mode 100644 src/Model/InlineResponse2001.php create mode 100644 src/Model/InlineResponse200HydraSearch.php create mode 100644 src/Model/InlineResponse200HydraSearchHydraMapping.php create mode 100644 src/Model/InlineResponse200HydraView.php create mode 100644 src/Model/MatchingContextCreate.php create mode 100644 src/Model/MatchingContextJsonldCreate.php create mode 100644 src/Model/MatchingContextJsonldRead.php create mode 100644 src/Model/MatchingContextRead.php create mode 100644 src/Model/ModelInterface.php create mode 100644 src/Model/NoticeCreate.php create mode 100644 src/Model/NoticeJsonldCreate.php create mode 100644 src/Model/NoticeJsonldRead.php create mode 100644 src/Model/NoticeRead.php create mode 100644 src/Model/Token.php create mode 100644 src/ObjectSerializer.php create mode 100644 test/Api/AuthenticationApiTest.php create mode 100644 test/Api/ContributorApiTest.php create mode 100644 test/Api/MatchingContextApiTest.php create mode 100644 test/Api/NoticeApiTest.php create mode 100644 test/DevServerTest.php create mode 100644 test/Model/ContributorJsonldReadTest.php create mode 100644 test/Model/CredentialsTest.php create mode 100644 test/Model/InlineResponse2001Test.php create mode 100644 test/Model/InlineResponse200HydraSearchHydraMappingTest.php create mode 100644 test/Model/InlineResponse200HydraSearchTest.php create mode 100644 test/Model/InlineResponse200HydraViewTest.php create mode 100644 test/Model/InlineResponse200Test.php create mode 100644 test/Model/MatchingContextCreateTest.php create mode 100644 test/Model/MatchingContextJsonldCreateTest.php create mode 100644 test/Model/MatchingContextJsonldReadTest.php create mode 100644 test/Model/MatchingContextReadTest.php create mode 100644 test/Model/NoticeCreateTest.php create mode 100644 test/Model/NoticeJsonldCreateTest.php create mode 100644 test/Model/NoticeJsonldReadTest.php create mode 100644 test/Model/NoticeReadTest.php create mode 100644 test/Model/TokenTest.php diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b6c7aca --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,23 @@ +name: Run unit tests +on: [push] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Cache Composer dependencies + uses: actions/cache@v2 + with: + path: /tmp/composer-cache + key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} + - name: Install dependancies + uses: php-actions/composer@v5 + with: + php_version: 7.3 + - name: PHPUnit tests + uses: php-actions/phpunit@v2 + env: + API_KEY: ${{ secrets.API_KEY }} + BASE_URI: https://api.dismoi.io/v4 + with: + args: tests \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f5d5a04 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore + +/vendor/ +composer.phar + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# composer.lock + +.openapi-generator +.openapi-generator-ignore + +# php-cs-fixer cache +.php_cs.cache + +# PHPUnit cache +.phpunit.result.cache \ No newline at end of file diff --git a/.php_cs b/.php_cs new file mode 100644 index 0000000..0bd7d8c --- /dev/null +++ b/.php_cs @@ -0,0 +1,101 @@ +in(__DIR__) + ->path('src/') + ->path('test/') +; + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules([ + '@DoctrineAnnotation' => true, + '@PHP71Migration' => true, + '@PHP71Migration:risky' => true, + '@PHPUnit60Migration:risky' => true, + '@Symfony' => true, + '@Symfony:risky' => true, + 'single_line_comment_style' => true, + 'comment_to_phpdoc' => true, + 'align_multiline_comment' => [ + 'comment_type' => 'phpdocs_like', + ], + 'array_indentation' => true, + 'array_syntax' => [ + 'syntax' => 'short', + ], + 'compact_nullable_typehint' => true, + 'doctrine_annotation_array_assignment' => [ + 'operator' => '=', + ], + 'doctrine_annotation_spaces' => [ + 'after_array_assignments_equals' => false, + 'before_array_assignments_equals' => false, + ], + 'explicit_indirect_variable' => true, + 'fully_qualified_strict_types' => true, + 'logical_operators' => true, + 'multiline_comment_opening_closing' => true, + 'multiline_whitespace_before_semicolons' => [ + 'strategy' => 'no_multi_line', + ], + 'no_alternative_syntax' => true, + 'no_extra_blank_lines' => [ + 'tokens' => [ + 'break', + 'continue', + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'return', + 'square_brace_block', + 'throw', + 'use', + ], + ], + 'no_superfluous_elseif' => true, + 'no_superfluous_phpdoc_tags' => [ + 'allow_mixed' => true, + ], + 'no_unset_cast' => true, + 'no_unset_on_property' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'not_operator_with_space' => true, + 'ordered_imports' => [ + 'imports_order' => [ + 'class', + 'function', + 'const', + ], + 'sort_algorithm' => 'alpha', + ], + 'php_unit_method_casing' => [ + 'case' => 'camel_case', + ], + 'php_unit_set_up_tear_down_visibility' => true, + 'php_unit_test_annotation' => [ + 'style' => 'prefix', + ], + 'phpdoc_add_missing_param_annotation' => [ + 'only_untyped' => true, + ], + 'phpdoc_no_alias_tag' => false, // Set the rule to true when https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5357 is fixed + 'phpdoc_order' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'phpdoc_var_annotation_correct_order' => true, + 'return_assignment' => true, + 'strict_param' => true, + 'visibility_required' => [ + 'elements' => [ + 'const', + 'method', + 'property', + ], + ], + 'void_return' => true, + ]) + ->setFinder($finder) +; diff --git a/README.md b/README.md index e69de29..1cba745 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,144 @@ +# dismoi/api-client + +OpenAPI documentation and _sandbox_ for **DisMoi** (_Tell Me_ in french), +a FLOSS web annotations project to turn the tide of the opinion wars back in favor of the internauts. + +- [Official Website](https://www.dismoi.io/) +- [Source Code](https://github.com/dis-moi) +- [Report Issues](https://github.com/dis-moi/backend/issues) (_please!_) + + + +## Installation & Usage + +### Requirements + +PHP 7.3 and later. +Should also work with PHP 8.0 but has not been tested. + +### Composer + +To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`: + +```json +{ + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + } + ], + "require": { + "GIT_USER_ID/GIT_REPO_ID": "*@dev" + } +} +``` + +Then run `composer install` + +### Manual Installation + +Download the files and include `autoload.php`: + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\AuthenticationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$credentials = new \DisMoi\Client\Model\Credentials(); // \DisMoi\Client\Model\Credentials | Generate a new Json Web Token (JWT) + +try { + $result = $apiInstance->postCredentialsItem($credentials); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AuthenticationApi->postCredentialsItem: ', $e->getMessage(), PHP_EOL; +} + +``` + +## API Endpoints + +All URIs are relative to *http://localhost:8088* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthenticationApi* | [**postCredentialsItem**](docs/Api/AuthenticationApi.md#postcredentialsitem) | **POST** /v4/_jwt | Returns an authentication token (JWT) from login credentials. +*ContributorApi* | [**getContributorItem**](docs/Api/ContributorApi.md#getcontributoritem) | **GET** /v4/contributors/{id} | Retrieves a Contributor resource. +*MatchingContextApi* | [**apiNoticesMatchingContextsGetSubresourceNoticeSubresource**](docs/Api/MatchingContextApi.md#apinoticesmatchingcontextsgetsubresourcenoticesubresource) | **GET** /v4/notices/{id}/matching_contexts | Retrieves a Notice resource. +*MatchingContextApi* | [**getMatchingContextCollection**](docs/Api/MatchingContextApi.md#getmatchingcontextcollection) | **GET** /v4/matching_contexts | Retrieves the collection of MatchingContext resources. +*MatchingContextApi* | [**getMatchingContextItem**](docs/Api/MatchingContextApi.md#getmatchingcontextitem) | **GET** /v4/matching_contexts/{id} | Retrieves a MatchingContext resource. +*MatchingContextApi* | [**postMatchingContextCollection**](docs/Api/MatchingContextApi.md#postmatchingcontextcollection) | **POST** /v4/matching_contexts | Creates a MatchingContext resource. +*NoticeApi* | [**apiNoticesMatchingContextsGetSubresourceNoticeSubresource**](docs/Api/NoticeApi.md#apinoticesmatchingcontextsgetsubresourcenoticesubresource) | **GET** /v4/notices/{id}/matching_contexts | Retrieves a Notice resource. +*NoticeApi* | [**deleteNoticeItem**](docs/Api/NoticeApi.md#deletenoticeitem) | **DELETE** /v4/notices/{id} | Removes the Notice resource. +*NoticeApi* | [**getNoticeCollection**](docs/Api/NoticeApi.md#getnoticecollection) | **GET** /v4/notices | Retrieves the collection of Notice resources. +*NoticeApi* | [**getNoticeItem**](docs/Api/NoticeApi.md#getnoticeitem) | **GET** /v4/notices/{id} | Retrieves a Notice resource. +*NoticeApi* | [**postNoticeCollection**](docs/Api/NoticeApi.md#postnoticecollection) | **POST** /v4/notices | Creates a Notice resource. + +## Models + +- [ContributorJsonldRead](docs/Model/ContributorJsonldRead.md) +- [Credentials](docs/Model/Credentials.md) +- [InlineResponse200](docs/Model/InlineResponse200.md) +- [InlineResponse2001](docs/Model/InlineResponse2001.md) +- [InlineResponse200HydraSearch](docs/Model/InlineResponse200HydraSearch.md) +- [InlineResponse200HydraSearchHydraMapping](docs/Model/InlineResponse200HydraSearchHydraMapping.md) +- [InlineResponse200HydraView](docs/Model/InlineResponse200HydraView.md) +- [MatchingContextCreate](docs/Model/MatchingContextCreate.md) +- [MatchingContextJsonldCreate](docs/Model/MatchingContextJsonldCreate.md) +- [MatchingContextJsonldRead](docs/Model/MatchingContextJsonldRead.md) +- [MatchingContextRead](docs/Model/MatchingContextRead.md) +- [NoticeCreate](docs/Model/NoticeCreate.md) +- [NoticeJsonldCreate](docs/Model/NoticeJsonldCreate.md) +- [NoticeJsonldRead](docs/Model/NoticeJsonldRead.md) +- [NoticeRead](docs/Model/NoticeRead.md) +- [Token](docs/Model/Token.md) + +## Authorization + +### apiKey + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + + +## Tests + +To run the tests, use: + +```bash +composer install +vendor/bin/phpunit +``` + +## Author + + + +## About this package + +This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: `4.0.0` + - Package version: `0.0.1` +- Build package: `io.dismoi.codegen.PhpClientCodegen` diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..6ea1f88 --- /dev/null +++ b/composer.json @@ -0,0 +1,54 @@ +{ + "name": "dismoi/api-client", + "version": "0.0.1", + "description": "OpenAPI documentation and _sandbox_ for **DisMoi** (_Tell Me_ in french), a FLOSS web annotations project to turn the tide of the opinion wars back in favor of the internauts. - [Official Website](https://www.dismoi.io/) - [Source Code](https://github.com/dis-moi) - [Report Issues](https://github.com/dis-moi/backend/issues) (_please!_)", + "keywords": [ + "openapitools", + "openapi-generator", + "openapi", + "php", + "sdk", + "rest", + "api" + ], + "homepage": "https://dismoi.io", + "license": "AGPL-3.0-or-later", + "type": "library", + "authors": [ + { + "name": "DisMoi", + "homepage": "https://dismoi.io" + } + ], + "require": { + "php": "^7.3 || ^8.0", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.0 || ^9.0", + "friendsofphp/php-cs-fixer": "^2.12" + }, + "autoload": { + "psr-4": { "DisMoi\\Client\\" : "src/" } + }, + "autoload-dev": { + "psr-4": { "DisMoi\\Client\\Test\\" : "test/" } + }, + "scripts": { + "fix-cs": [ + "php-cs-fixer fix" + ], + "check-cs": [ + "php-cs-fixer fix --dry-run --stop-on-violation" + ], + "test": [ + "phpunit test/ --exclude-group dev" + ], + "test-dev": [ + "phpunit test/ --group dev" + ] + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..7a21776 --- /dev/null +++ b/composer.lock @@ -0,0 +1,4518 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "d495e7d877b770dfd7a26ebfa1dd4d86", + "packages": [ + { + "name": "guzzlehttp/guzzle", + "version": "6.5.5", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/6.5" + }, + "time": "2020-06-16T21:01:06+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.4.1" + }, + "time": "2021-03-07T09:25:29+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.8.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "dc960a912984efb74d0a90222870c72c87f10c91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", + "reference": "dc960a912984efb74d0a90222870c72c87f10c91", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/1.8.2" + }, + "time": "2021-04-26T09:17:50+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:27:20+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:17:38+00:00" + } + ], + "packages-dev": [ + { + "name": "composer/semver", + "version": "3.2.5", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-24T12:41:47+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/964adcdd3a28bf9ed5d9ac6450064e0d71ed7496", + "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-05T19:37:51+00:00" + }, + { + "name": "doctrine/annotations", + "version": "1.13.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.13.1" + }, + "time": "2021-05-16T18:07:53+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.19.0", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/d5b8a9d852b292c2f8a035200fa6844b1f82300b", + "reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.2 || ^2.0", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0 || ^8.0", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", + "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^3.0 || ^4.0 || ^5.0", + "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0 || ^5.0", + "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.4", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.4.2", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy-phpunit": "^1.1 || ^2.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", + "symfony/phpunit-bridge": "^5.2.1", + "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "extra": { + "branch-alias": { + "dev-master": "2.19-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/Test/IsIdenticalConstraint.php", + "tests/Test/TokensWithObservedTransformers.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz RumiƄski", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.0" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2021-05-03T21:43:24+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.12.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + }, + "time": "2021-07-21T10:44:31+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + }, + "time": "2020-10-14T08:39:05+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f6293e1b30a2354e8428e004689671b83871edde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", + "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.10.2", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-03-28T07:26:59+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", + "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:57:25+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0dc8b6999c937616df4fb046792004b33fd31c5", + "reference": "d0dc8b6999c937616df4fb046792004b33fd31c5", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpspec/prophecy": "^1.12.1", + "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.5", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.3", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^2.3.4", + "sebastian/version": "^3.0.2" + }, + "require-dev": { + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0.1" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ], + "files": [ + "src/Framework/Assert/Functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.7" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-19T06:14:47+00:00" + }, + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", + "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:49:45+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", + "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:52:38+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:24:23+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-11T13:31:12+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "2.3.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-15T12:49:02+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/console", + "version": "v5.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/649730483885ff2ca99ca0560ef0e5f6b03f2ac1", + "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php80": "^1.15", + "symfony/service-contracts": "^1.1|^2", + "symfony/string": "^5.1" + }, + "conflict": { + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/event-dispatcher": "^4.4|^5.0", + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^4.4|^5.0", + "symfony/var-dumper": "^4.4|^5.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-06-12T09:42:48+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v5.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "67a5f354afa8e2f231081b3fa11a5912f933c3ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67a5f354afa8e2f231081b3fa11a5912f933c3ce", + "reference": "67a5f354afa8e2f231081b3fa11a5912f933c3ce", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/event-dispatcher-contracts": "^2", + "symfony/polyfill-php80": "^1.15" + }, + "conflict": { + "symfony/dependency-injection": "<4.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/error-handler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^4.4|^5.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v5.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-26T17:43:10+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/69fee1ad2332a7cbab3aca13591953da9cdb7a11", + "reference": "69fee1ad2332a7cbab3aca13591953da9cdb7a11", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/event-dispatcher": "^1" + }, + "suggest": { + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.3.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/19b71c8f313b411172dd5f470fd61f24466d79a9", + "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.3.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-06-30T07:27:52+00:00" + }, + { + "name": "symfony/finder", + "version": "v5.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", + "reference": "0ae3f047bed4edff6fd35b26a9a6bfdc92c953c6", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v5.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-26T12:52:38+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v5.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "162e886ca035869866d233a2bfef70cc28f9bbe5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/162e886ca035869866d233a2bfef70cc28f9bbe5", + "reference": "162e886ca035869866d233a2bfef70cc28f9bbe5", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v5.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-26T17:43:10+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/24b72c6baa32c746a4d0840147c9715e42bb68ab", + "reference": "24b72c6baa32c746a4d0840147c9715e42bb68ab", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:17:38+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:27:20+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/process", + "version": "v5.3.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "714b47f9196de61a196d86c4bad5f09201b307df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/714b47f9196de61a196d86c4bad5f09201b307df", + "reference": "714b47f9196de61a196d86c4bad5f09201b307df", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.15" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v5.3.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-06-12T10:15:01+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-04-01T10:43:52+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v5.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "313d02f59d6543311865007e5ff4ace05b35ee65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/313d02f59d6543311865007e5ff4ace05b35ee65", + "reference": "313d02f59d6543311865007e5ff4ace05b35ee65", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/service-contracts": "^1.0|^2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v5.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-26T17:43:10+00:00" + }, + { + "name": "symfony/string", + "version": "v5.3.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0", + "symfony/http-client": "^4.4|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "files": [ + "Resources/functions.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.3.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-06-27T11:44:38+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "75a63c33a8577608444246075ea0af0d052e452a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/master" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^7.3 || ^8.0", + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*" + }, + "platform-dev": [], + "plugin-api-version": "2.1.0" +} diff --git a/docs/Api/AuthenticationApi.md b/docs/Api/AuthenticationApi.md new file mode 100644 index 0000000..789f6d6 --- /dev/null +++ b/docs/Api/AuthenticationApi.md @@ -0,0 +1,68 @@ +# DisMoi\Client\AuthenticationApi + +All URIs are relative to http://localhost:8088. + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**postCredentialsItem()**](AuthenticationApi.md#postCredentialsItem) | **POST** /v4/_jwt | Returns an authentication token (JWT) from login credentials. + + +## `postCredentialsItem()` + +```php +postCredentialsItem($credentials): \DisMoi\Client\Model\Token +``` + +Returns an authentication token (JWT) from login credentials. + +Usage of this API require authentication. The Token returned is a [JWT](https://jwt.io/) valid for ten hours. Use this token in the `Authorization` header, prefixed by `Bearer `, like so: `Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9
`. You may use the `Authorize 🔒` button in the sandbox to do this, if you're using the sandbox. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\AuthenticationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$credentials = new \DisMoi\Client\Model\Credentials(); // \DisMoi\Client\Model\Credentials | Generate a new Json Web Token (JWT) + +try { + $result = $apiInstance->postCredentialsItem($credentials); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling AuthenticationApi->postCredentialsItem: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **credentials** | [**\DisMoi\Client\Model\Credentials**](../Model/Credentials.md)| Generate a new Json Web Token (JWT) | + +### Return type + +[**\DisMoi\Client\Model\Token**](../Model/Token.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/ContributorApi.md b/docs/Api/ContributorApi.md new file mode 100644 index 0000000..820e040 --- /dev/null +++ b/docs/Api/ContributorApi.md @@ -0,0 +1,68 @@ +# DisMoi\Client\ContributorApi + +All URIs are relative to http://localhost:8088. + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getContributorItem()**](ContributorApi.md#getContributorItem) | **GET** /v4/contributors/{id} | Retrieves a Contributor resource. + + +## `getContributorItem()` + +```php +getContributorItem($id): \DisMoi\Client\Model\ContributorJsonldRead +``` + +Retrieves a Contributor resource. + +Retrieves a Contributor resource. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\ContributorApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | Resource identifier + +try { + $result = $apiInstance->getContributorItem($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ContributorApi->getContributorItem: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Resource identifier | + +### Return type + +[**\DisMoi\Client\Model\ContributorJsonldRead**](../Model/ContributorJsonldRead.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/ld+json`, `application/json`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/MatchingContextApi.md b/docs/Api/MatchingContextApi.md new file mode 100644 index 0000000..07dbd93 --- /dev/null +++ b/docs/Api/MatchingContextApi.md @@ -0,0 +1,253 @@ +# DisMoi\Client\MatchingContextApi + +All URIs are relative to http://localhost:8088. + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**apiNoticesMatchingContextsGetSubresourceNoticeSubresource()**](MatchingContextApi.md#apiNoticesMatchingContextsGetSubresourceNoticeSubresource) | **GET** /v4/notices/{id}/matching_contexts | Retrieves a Notice resource. +[**getMatchingContextCollection()**](MatchingContextApi.md#getMatchingContextCollection) | **GET** /v4/matching_contexts | Retrieves the collection of MatchingContext resources. +[**getMatchingContextItem()**](MatchingContextApi.md#getMatchingContextItem) | **GET** /v4/matching_contexts/{id} | Retrieves a MatchingContext resource. +[**postMatchingContextCollection()**](MatchingContextApi.md#postMatchingContextCollection) | **POST** /v4/matching_contexts | Creates a MatchingContext resource. + + +## `apiNoticesMatchingContextsGetSubresourceNoticeSubresource()` + +```php +apiNoticesMatchingContextsGetSubresourceNoticeSubresource($id, $page): \DisMoi\Client\Model\InlineResponse200 +``` + +Retrieves a Notice resource. + +Retrieves a Notice resource. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\MatchingContextApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | Notice identifier +$page = 1; // int | The collection page number + +try { + $result = $apiInstance->apiNoticesMatchingContextsGetSubresourceNoticeSubresource($id, $page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MatchingContextApi->apiNoticesMatchingContextsGetSubresourceNoticeSubresource: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Notice identifier | + **page** | **int**| The collection page number | [optional] [default to 1] + +### Return type + +[**\DisMoi\Client\Model\InlineResponse200**](../Model/InlineResponse200.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/ld+json`, `application/json`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getMatchingContextCollection()` + +```php +getMatchingContextCollection($page): \DisMoi\Client\Model\InlineResponse200 +``` + +Retrieves the collection of MatchingContext resources. + +Retrieves the collection of MatchingContext resources. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\MatchingContextApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$page = 1; // int | The collection page number + +try { + $result = $apiInstance->getMatchingContextCollection($page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MatchingContextApi->getMatchingContextCollection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| The collection page number | [optional] [default to 1] + +### Return type + +[**\DisMoi\Client\Model\InlineResponse200**](../Model/InlineResponse200.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/ld+json`, `application/json`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getMatchingContextItem()` + +```php +getMatchingContextItem($id): \DisMoi\Client\Model\MatchingContextJsonldRead +``` + +Retrieves a MatchingContext resource. + +Retrieves a MatchingContext resource. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\MatchingContextApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | Resource identifier + +try { + $result = $apiInstance->getMatchingContextItem($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MatchingContextApi->getMatchingContextItem: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Resource identifier | + +### Return type + +[**\DisMoi\Client\Model\MatchingContextJsonldRead**](../Model/MatchingContextJsonldRead.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/ld+json`, `application/json`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postMatchingContextCollection()` + +```php +postMatchingContextCollection($matchingContextJsonldCreate): \DisMoi\Client\Model\MatchingContextJsonldRead +``` + +Creates a MatchingContext resource. + +Creates a MatchingContext resource. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\MatchingContextApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$matchingContextJsonldCreate = new \DisMoi\Client\Model\MatchingContextJsonldCreate(); // \DisMoi\Client\Model\MatchingContextJsonldCreate | The new MatchingContext resource + +try { + $result = $apiInstance->postMatchingContextCollection($matchingContextJsonldCreate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MatchingContextApi->postMatchingContextCollection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **matchingContextJsonldCreate** | [**\DisMoi\Client\Model\MatchingContextJsonldCreate**](../Model/MatchingContextJsonldCreate.md)| The new MatchingContext resource | + +### Return type + +[**\DisMoi\Client\Model\MatchingContextJsonldRead**](../Model/MatchingContextJsonldRead.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: `application/ld+json`, `application/json`, `text/html` +- **Accept**: `application/ld+json`, `application/json`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/NoticeApi.md b/docs/Api/NoticeApi.md new file mode 100644 index 0000000..0279ec0 --- /dev/null +++ b/docs/Api/NoticeApi.md @@ -0,0 +1,313 @@ +# DisMoi\Client\NoticeApi + +All URIs are relative to http://localhost:8088. + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**apiNoticesMatchingContextsGetSubresourceNoticeSubresource()**](NoticeApi.md#apiNoticesMatchingContextsGetSubresourceNoticeSubresource) | **GET** /v4/notices/{id}/matching_contexts | Retrieves a Notice resource. +[**deleteNoticeItem()**](NoticeApi.md#deleteNoticeItem) | **DELETE** /v4/notices/{id} | Removes the Notice resource. +[**getNoticeCollection()**](NoticeApi.md#getNoticeCollection) | **GET** /v4/notices | Retrieves the collection of Notice resources. +[**getNoticeItem()**](NoticeApi.md#getNoticeItem) | **GET** /v4/notices/{id} | Retrieves a Notice resource. +[**postNoticeCollection()**](NoticeApi.md#postNoticeCollection) | **POST** /v4/notices | Creates a Notice resource. + + +## `apiNoticesMatchingContextsGetSubresourceNoticeSubresource()` + +```php +apiNoticesMatchingContextsGetSubresourceNoticeSubresource($id, $page): \DisMoi\Client\Model\InlineResponse200 +``` + +Retrieves a Notice resource. + +Retrieves a Notice resource. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\NoticeApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | Notice identifier +$page = 1; // int | The collection page number + +try { + $result = $apiInstance->apiNoticesMatchingContextsGetSubresourceNoticeSubresource($id, $page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling NoticeApi->apiNoticesMatchingContextsGetSubresourceNoticeSubresource: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Notice identifier | + **page** | **int**| The collection page number | [optional] [default to 1] + +### Return type + +[**\DisMoi\Client\Model\InlineResponse200**](../Model/InlineResponse200.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/ld+json`, `application/json`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteNoticeItem()` + +```php +deleteNoticeItem($id) +``` + +Removes the Notice resource. + +Removes the Notice resource. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\NoticeApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | Resource identifier + +try { + $apiInstance->deleteNoticeItem($id); +} catch (Exception $e) { + echo 'Exception when calling NoticeApi->deleteNoticeItem: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Resource identifier | + +### Return type + +void (empty response body) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getNoticeCollection()` + +```php +getNoticeCollection($page): \DisMoi\Client\Model\InlineResponse2001 +``` + +Retrieves the collection of Notice resources. + +Retrieves the collection of Notice resources. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\NoticeApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$page = 1; // int | The collection page number + +try { + $result = $apiInstance->getNoticeCollection($page); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling NoticeApi->getNoticeCollection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| The collection page number | [optional] [default to 1] + +### Return type + +[**\DisMoi\Client\Model\InlineResponse2001**](../Model/InlineResponse2001.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/ld+json`, `application/json`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getNoticeItem()` + +```php +getNoticeItem($id): \DisMoi\Client\Model\NoticeJsonldRead +``` + +Retrieves a Notice resource. + +Retrieves a Notice resource. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\NoticeApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$id = 'id_example'; // string | Resource identifier + +try { + $result = $apiInstance->getNoticeItem($id); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling NoticeApi->getNoticeItem: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| Resource identifier | + +### Return type + +[**\DisMoi\Client\Model\NoticeJsonldRead**](../Model/NoticeJsonldRead.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/ld+json`, `application/json`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `postNoticeCollection()` + +```php +postNoticeCollection($noticeJsonldCreate): \DisMoi\Client\Model\NoticeJsonldRead +``` + +Creates a Notice resource. + +Creates a Notice resource. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); + + +$apiInstance = new DisMoi\Client\Api\NoticeApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$noticeJsonldCreate = new \DisMoi\Client\Model\NoticeJsonldCreate(); // \DisMoi\Client\Model\NoticeJsonldCreate | The new Notice resource + +try { + $result = $apiInstance->postNoticeCollection($noticeJsonldCreate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling NoticeApi->postNoticeCollection: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **noticeJsonldCreate** | [**\DisMoi\Client\Model\NoticeJsonldCreate**](../Model/NoticeJsonldCreate.md)| The new Notice resource | + +### Return type + +[**\DisMoi\Client\Model\NoticeJsonldRead**](../Model/NoticeJsonldRead.md) + +### Authorization + +[apiKey](../../README.md#apiKey) + +### HTTP request headers + +- **Content-Type**: `application/ld+json`, `application/json`, `text/html` +- **Accept**: `application/ld+json`, `application/json`, `text/html` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Model/ContributorJsonldRead.md b/docs/Model/ContributorJsonldRead.md new file mode 100644 index 0000000..c329ce2 --- /dev/null +++ b/docs/Model/ContributorJsonldRead.md @@ -0,0 +1,11 @@ +# # ContributorJsonldRead + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**OneOfStringMap**](OneOfStringMap.md) | | [optional] [readonly] +**id** | **string** | | [optional] [readonly] +**type** | **string** | | [optional] [readonly] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Credentials.md b/docs/Model/Credentials.md new file mode 100644 index 0000000..6d6bc66 --- /dev/null +++ b/docs/Model/Credentials.md @@ -0,0 +1,10 @@ +# # Credentials + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **string** | The username you chose during registration. | [optional] +**password** | **string** | The password you chose during registration. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse200.md b/docs/Model/InlineResponse200.md new file mode 100644 index 0000000..8ed64e9 --- /dev/null +++ b/docs/Model/InlineResponse200.md @@ -0,0 +1,12 @@ +# # InlineResponse200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**member** | [**\DisMoi\Client\Model\MatchingContextJsonldRead[]**](MatchingContextJsonldRead.md) | | +**totalItems** | **int** | | [optional] +**view** | [**\DisMoi\Client\Model\InlineResponse200HydraView**](InlineResponse200HydraView.md) | | [optional] +**search** | [**\DisMoi\Client\Model\InlineResponse200HydraSearch**](InlineResponse200HydraSearch.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2001.md b/docs/Model/InlineResponse2001.md new file mode 100644 index 0000000..bcea65e --- /dev/null +++ b/docs/Model/InlineResponse2001.md @@ -0,0 +1,12 @@ +# # InlineResponse2001 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**member** | [**\DisMoi\Client\Model\NoticeJsonldRead[]**](NoticeJsonldRead.md) | | +**totalItems** | **int** | | [optional] +**view** | [**\DisMoi\Client\Model\InlineResponse200HydraView**](InlineResponse200HydraView.md) | | [optional] +**search** | [**\DisMoi\Client\Model\InlineResponse200HydraSearch**](InlineResponse200HydraSearch.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse200HydraSearch.md b/docs/Model/InlineResponse200HydraSearch.md new file mode 100644 index 0000000..a206a3b --- /dev/null +++ b/docs/Model/InlineResponse200HydraSearch.md @@ -0,0 +1,12 @@ +# # InlineResponse200HydraSearch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**template** | **string** | | [optional] +**variableRepresentation** | **string** | | [optional] +**mapping** | [**\DisMoi\Client\Model\InlineResponse200HydraSearchHydraMapping[]**](InlineResponse200HydraSearchHydraMapping.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse200HydraSearchHydraMapping.md b/docs/Model/InlineResponse200HydraSearchHydraMapping.md new file mode 100644 index 0000000..3ba4f19 --- /dev/null +++ b/docs/Model/InlineResponse200HydraSearchHydraMapping.md @@ -0,0 +1,12 @@ +# # InlineResponse200HydraSearchHydraMapping + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**variable** | **string** | | [optional] +**property** | **string** | | [optional] +**required** | **bool** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse200HydraView.md b/docs/Model/InlineResponse200HydraView.md new file mode 100644 index 0000000..1138abd --- /dev/null +++ b/docs/Model/InlineResponse200HydraView.md @@ -0,0 +1,14 @@ +# # InlineResponse200HydraView + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**type** | **string** | | [optional] +**first** | **string** | | [optional] +**last** | **string** | | [optional] +**previous** | **string** | | [optional] +**next** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MatchingContextCreate.md b/docs/Model/MatchingContextCreate.md new file mode 100644 index 0000000..c3073e7 --- /dev/null +++ b/docs/Model/MatchingContextCreate.md @@ -0,0 +1,16 @@ +# # MatchingContextCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | An incremental, unique identifier for this matching context. | [optional] [readonly] +**notice** | [**AnyOfNoticeCreate**](AnyOfNoticeCreate.md) | This Notice this Matching Context tries to pinpoint on the Internet. | [optional] +**exampleUrl** | **string** | | [optional] +**urlRegex** | **string** | | +**excludeUrlRegex** | **string** | | [optional] +**description** | **string** | | [optional] +**querySelector** | **string** | a CSS selector | [optional] +**xpath** | **string** | an XPath expression | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MatchingContextJsonldCreate.md b/docs/Model/MatchingContextJsonldCreate.md new file mode 100644 index 0000000..cdfac67 --- /dev/null +++ b/docs/Model/MatchingContextJsonldCreate.md @@ -0,0 +1,19 @@ +# # MatchingContextJsonldCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**OneOfStringMap**](OneOfStringMap.md) | | [optional] [readonly] +**id** | **string** | | [optional] [readonly] +**type** | **string** | | [optional] [readonly] +**id** | **int** | An incremental, unique identifier for this matching context. | [optional] [readonly] +**notice** | [**AnyOfNoticeJsonldCreate**](AnyOfNoticeJsonldCreate.md) | This Notice this Matching Context tries to pinpoint on the Internet. | [optional] +**exampleUrl** | **string** | | [optional] +**urlRegex** | **string** | | +**excludeUrlRegex** | **string** | | [optional] +**description** | **string** | | [optional] +**querySelector** | **string** | a CSS selector | [optional] +**xpath** | **string** | an XPath expression | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MatchingContextJsonldRead.md b/docs/Model/MatchingContextJsonldRead.md new file mode 100644 index 0000000..c1fe194 --- /dev/null +++ b/docs/Model/MatchingContextJsonldRead.md @@ -0,0 +1,17 @@ +# # MatchingContextJsonldRead + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] [readonly] +**type** | **string** | | [optional] [readonly] +**context** | [**OneOfStringMap**](OneOfStringMap.md) | | [optional] [readonly] +**exampleUrl** | **string** | | [optional] +**urlRegex** | **string** | | +**excludeUrlRegex** | **string** | | [optional] +**description** | **string** | | [optional] +**querySelector** | **string** | a CSS selector | [optional] +**xpath** | **string** | an XPath expression | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MatchingContextRead.md b/docs/Model/MatchingContextRead.md new file mode 100644 index 0000000..9a18632 --- /dev/null +++ b/docs/Model/MatchingContextRead.md @@ -0,0 +1,14 @@ +# # MatchingContextRead + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exampleUrl** | **string** | | [optional] +**urlRegex** | **string** | | +**excludeUrlRegex** | **string** | | [optional] +**description** | **string** | | [optional] +**querySelector** | **string** | a CSS selector | [optional] +**xpath** | **string** | an XPath expression | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NoticeCreate.md b/docs/Model/NoticeCreate.md new file mode 100644 index 0000000..9e5fe0d --- /dev/null +++ b/docs/Model/NoticeCreate.md @@ -0,0 +1,13 @@ +# # NoticeCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**visibility** | **string** | The visibility of the Notice. See `NoticeVisibility` for an enumeration of the allowed values: - \"public\": anyone may view this Notice - \"private\": Notice is only visible to Contributor - \"archived\": A deleted notice because it wasn't relevant anymore - \"draft\": Notice is only visible to Contributor, pending publication - \"question\": A question asked by a someone on a webpage. A question is not publicly visible. | [optional] [default to 'private'] +**matchingContexts** | [**\DisMoi\Client\Model\MatchingContextCreate[]**](MatchingContextCreate.md) | | [optional] +**contributor** | **string** | The Contributor who submitted the Notice. | [optional] +**message** | **string** | The raw message attached to the Notice, as given by the Contributor. It is unsafe to read from it, prefer reading from `strippedMessage`. | [optional] +**expires** | [**\DateTime**](\DateTime.md) | Expiration date of the notice, in the ISO8601 format. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NoticeJsonldCreate.md b/docs/Model/NoticeJsonldCreate.md new file mode 100644 index 0000000..d9759e6 --- /dev/null +++ b/docs/Model/NoticeJsonldCreate.md @@ -0,0 +1,16 @@ +# # NoticeJsonldCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**OneOfStringMap**](OneOfStringMap.md) | | [optional] [readonly] +**id** | **string** | | [optional] [readonly] +**type** | **string** | | [optional] [readonly] +**visibility** | **string** | The visibility of the Notice. See `NoticeVisibility` for an enumeration of the allowed values: - \"public\": anyone may view this Notice - \"private\": Notice is only visible to Contributor - \"archived\": A deleted notice because it wasn't relevant anymore - \"draft\": Notice is only visible to Contributor, pending publication - \"question\": A question asked by a someone on a webpage. A question is not publicly visible. | [optional] [default to 'private'] +**matchingContexts** | [**\DisMoi\Client\Model\MatchingContextJsonldCreate[]**](MatchingContextJsonldCreate.md) | | [optional] +**contributor** | **string** | The Contributor who submitted the Notice. | [optional] +**message** | **string** | The raw message attached to the Notice, as given by the Contributor. It is unsafe to read from it, prefer reading from `strippedMessage`. | [optional] +**expires** | [**\DateTime**](\DateTime.md) | Expiration date of the notice, in the ISO8601 format. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NoticeJsonldRead.md b/docs/Model/NoticeJsonldRead.md new file mode 100644 index 0000000..9ee9563 --- /dev/null +++ b/docs/Model/NoticeJsonldRead.md @@ -0,0 +1,29 @@ +# # NoticeJsonldRead + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | [**OneOfStringMap**](OneOfStringMap.md) | | [optional] [readonly] +**id** | **string** | | [optional] [readonly] +**type** | **string** | | [optional] [readonly] +**id** | **int** | A unique, incremental, numerical identifier for the Notice. | [optional] [readonly] +**visibility** | **string** | The visibility of the Notice. See `NoticeVisibility` for an enumeration of the allowed values: - \"public\": anyone may view this Notice - \"private\": Notice is only visible to Contributor - \"archived\": A deleted notice because it wasn't relevant anymore - \"draft\": Notice is only visible to Contributor, pending publication - \"question\": A question asked by a someone on a webpage. A question is not publicly visible. | [optional] [default to 'private'] +**matchingContexts** | [**\DisMoi\Client\Model\MatchingContextJsonldRead[]**](MatchingContextJsonldRead.md) | | [optional] +**contributor** | **string** | The Contributor who submitted the Notice. | [optional] +**message** | **string** | The raw message attached to the Notice, as given by the Contributor. It is unsafe to read from it, prefer reading from `strippedMessage`. | [optional] +**badgedCount** | **int** | | [optional] +**displayedCount** | **int** | The number of time the notice has been displayed in a list. | [optional] +**unfoldedCount** | **int** | The number of time the notice has been displayed in full. | [optional] +**clickedCount** | **int** | The number of time the notice has been clicked. | [optional] +**likedCount** | **int** | The number of time the notice has been liked. | [optional] +**dislikedCount** | **int** | The number of time the notice has been disliked. | [optional] +**dismissedCount** | **int** | The number of time the notice has been dismissed. | [optional] +**created** | [**\DateTime**](\DateTime.md) | Creation date of the notice, serialized in the ISO8601 format. | [optional] [readonly] +**expires** | [**\DateTime**](\DateTime.md) | Expiration date of the notice, in the ISO8601 format. | [optional] +**modified** | [**\DateTime**](\DateTime.md) | Last modification date of the notice, serialized in the ISO8601 format. | [optional] [readonly] +**strippedMessage** | **string** | The message attached to the Notice, ie. what the user wants to read, the main content of DisMoi, the added value, etc. It is HTML, and is \"purified\", ie. is stripped of HTML tags not in ALLOWED_TAGS. | [optional] [readonly] +**likes** | **int** | Amount of likes the Notice has received. | [optional] [readonly] +**dislikes** | **int** | Amount of dislikes the Notice has received. | [optional] [readonly] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NoticeRead.md b/docs/Model/NoticeRead.md new file mode 100644 index 0000000..0ab983e --- /dev/null +++ b/docs/Model/NoticeRead.md @@ -0,0 +1,26 @@ +# # NoticeRead + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | A unique, incremental, numerical identifier for the Notice. | [optional] [readonly] +**visibility** | **string** | The visibility of the Notice. See `NoticeVisibility` for an enumeration of the allowed values: - \"public\": anyone may view this Notice - \"private\": Notice is only visible to Contributor - \"archived\": A deleted notice because it wasn't relevant anymore - \"draft\": Notice is only visible to Contributor, pending publication - \"question\": A question asked by a someone on a webpage. A question is not publicly visible. | [optional] [default to 'private'] +**matchingContexts** | [**\DisMoi\Client\Model\MatchingContextRead[]**](MatchingContextRead.md) | | [optional] +**contributor** | **string** | The Contributor who submitted the Notice. | [optional] +**message** | **string** | The raw message attached to the Notice, as given by the Contributor. It is unsafe to read from it, prefer reading from `strippedMessage`. | [optional] +**badgedCount** | **int** | | [optional] +**displayedCount** | **int** | The number of time the notice has been displayed in a list. | [optional] +**unfoldedCount** | **int** | The number of time the notice has been displayed in full. | [optional] +**clickedCount** | **int** | The number of time the notice has been clicked. | [optional] +**likedCount** | **int** | The number of time the notice has been liked. | [optional] +**dislikedCount** | **int** | The number of time the notice has been disliked. | [optional] +**dismissedCount** | **int** | The number of time the notice has been dismissed. | [optional] +**created** | [**\DateTime**](\DateTime.md) | Creation date of the notice, serialized in the ISO8601 format. | [optional] [readonly] +**expires** | [**\DateTime**](\DateTime.md) | Expiration date of the notice, in the ISO8601 format. | [optional] +**modified** | [**\DateTime**](\DateTime.md) | Last modification date of the notice, serialized in the ISO8601 format. | [optional] [readonly] +**strippedMessage** | **string** | The message attached to the Notice, ie. what the user wants to read, the main content of DisMoi, the added value, etc. It is HTML, and is \"purified\", ie. is stripped of HTML tags not in ALLOWED_TAGS. | [optional] [readonly] +**likes** | **int** | Amount of likes the Notice has received. | [optional] [readonly] +**dislikes** | **int** | Amount of dislikes the Notice has received. | [optional] [readonly] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Token.md b/docs/Model/Token.md new file mode 100644 index 0000000..3dcc7ee --- /dev/null +++ b/docs/Model/Token.md @@ -0,0 +1,9 @@ +# # Token + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **string** | | [optional] [readonly] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/model_enum b/model_enum new file mode 100644 index 0000000..f30bda1 --- /dev/null +++ b/model_enum @@ -0,0 +1,17 @@ +class +{ + /** + * Possible values of this enum + */ + + /** + * Gets allowable values of the enum + * @return string[] + */ + public static function getAllowableEnumValues() + { + return [ + + ]; + } +} diff --git a/model_generic b/model_generic new file mode 100644 index 0000000..3e1e258 --- /dev/null +++ b/model_generic @@ -0,0 +1,248 @@ +class implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = ''; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/partial_header b/partial_header new file mode 100644 index 0000000..0094535 --- /dev/null +++ b/partial_header @@ -0,0 +1,11 @@ +/** + * DisMoi OpenAPI + * + * OpenAPI documentation and _sandbox_ for **DisMoi** (_Tell Me_ in french), a FLOSS web annotations project to turn the tide of the opinion wars back in favor of the internauts. - [Official Website](https://www.dismoi.io/) - [Source Code](https://github.com/dis-moi) - [Report Issues](https://github.com/dis-moi/backend/issues) (_please!_) + * + * The version of the OpenAPI document: 4.0.0 + * Generated by: https://openapi-generator.tech + * OpenAPI Generator version: 5.0.1 + * + * This class is auto generated, do not edit manually. + */ diff --git a/php_doc_auth_partial b/php_doc_auth_partial new file mode 100644 index 0000000..28f1be7 --- /dev/null +++ b/php_doc_auth_partial @@ -0,0 +1,4 @@ + +// Configure API key authorization: apiKey +$config = DisMoi\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); + diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..e7a4a8e --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,23 @@ + + + + + ./test/Api + ./test/Model + + + + + ./src/Api + ./src/Model + + + + + + diff --git a/src/Api/AuthenticationApi.php b/src/Api/AuthenticationApi.php new file mode 100644 index 0000000..2c88023 --- /dev/null +++ b/src/Api/AuthenticationApi.php @@ -0,0 +1,358 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index. + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index. + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation postCredentialsItem. + * + * Returns an authentication token (JWT) from login credentials. + * + * @param \DisMoi\Client\Model\Credentials $credentials Generate a new Json Web Token (JWT) (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\Token + */ + public function postCredentialsItem($credentials) + { + [$response] = $this->postCredentialsItemWithHttpInfo($credentials); + + return $response; + } + + /** + * Operation postCredentialsItemWithHttpInfo. + * + * Returns an authentication token (JWT) from login credentials. + * + * @param \DisMoi\Client\Model\Credentials $credentials Generate a new Json Web Token (JWT) (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\Token, HTTP status code, HTTP response headers (array of strings) + */ + public function postCredentialsItemWithHttpInfo($credentials) + { + $request = $this->postCredentialsItemRequest($credentials); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 200: + if ('\DisMoi\Client\Model\Token' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\Token', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\Token'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\Token', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation postCredentialsItemAsync. + * + * Returns an authentication token (JWT) from login credentials. + * + * @param \DisMoi\Client\Model\Credentials $credentials Generate a new Json Web Token (JWT) (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postCredentialsItemAsync($credentials) + { + return $this->postCredentialsItemAsyncWithHttpInfo($credentials) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postCredentialsItemAsyncWithHttpInfo. + * + * Returns an authentication token (JWT) from login credentials. + * + * @param \DisMoi\Client\Model\Credentials $credentials Generate a new Json Web Token (JWT) (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postCredentialsItemAsyncWithHttpInfo($credentials) + { + $returnType = '\DisMoi\Client\Model\Token'; + $request = $this->postCredentialsItemRequest($credentials); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'postCredentialsItem'. + * + * @param \DisMoi\Client\Model\Credentials $credentials Generate a new Json Web Token (JWT) (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function postCredentialsItemRequest($credentials) + { + // verify the required parameter 'credentials' is set + if (null === $credentials || (\is_array($credentials) && 0 === \count($credentials))) { + throw new \InvalidArgumentException('Missing the required parameter $credentials when calling postCredentialsItem'); + } + + $resourcePath = '/v4/_jwt'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($credentials)) { + if ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($credentials)); + } else { + $httpBody = $credentials; + } + } elseif (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'POST', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option. + * + * @throws \RuntimeException on file opening failure + * + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if ( ! $options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/src/Api/ContributorApi.php b/src/Api/ContributorApi.php new file mode 100644 index 0000000..7f4323a --- /dev/null +++ b/src/Api/ContributorApi.php @@ -0,0 +1,361 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index. + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index. + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation getContributorItem. + * + * Retrieves a Contributor resource. + * + * @param string $id Resource identifier (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\ContributorJsonldRead + */ + public function getContributorItem($id) + { + [$response] = $this->getContributorItemWithHttpInfo($id); + + return $response; + } + + /** + * Operation getContributorItemWithHttpInfo. + * + * Retrieves a Contributor resource. + * + * @param string $id Resource identifier (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\ContributorJsonldRead, HTTP status code, HTTP response headers (array of strings) + */ + public function getContributorItemWithHttpInfo($id) + { + $request = $this->getContributorItemRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 200: + if ('\DisMoi\Client\Model\ContributorJsonldRead' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\ContributorJsonldRead', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\ContributorJsonldRead'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\ContributorJsonldRead', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getContributorItemAsync. + * + * Retrieves a Contributor resource. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContributorItemAsync($id) + { + return $this->getContributorItemAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getContributorItemAsyncWithHttpInfo. + * + * Retrieves a Contributor resource. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getContributorItemAsyncWithHttpInfo($id) + { + $returnType = '\DisMoi\Client\Model\ContributorJsonldRead'; + $request = $this->getContributorItemRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'getContributorItem'. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function getContributorItemRequest($id) + { + // verify the required parameter 'id' is set + if (null === $id || (\is_array($id) && 0 === \count($id))) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling getContributorItem'); + } + + $resourcePath = '/v4/contributors/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if (null !== $id) { + $resourcePath = str_replace( + '{'.'id'.'}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/ld+json', 'application/json', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/ld+json', 'application/json', 'text/html'], + [] + ); + } + + // for model (json/xml) + if (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'GET', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option. + * + * @throws \RuntimeException on file opening failure + * + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if ( ! $options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/src/Api/MatchingContextApi.php b/src/Api/MatchingContextApi.php new file mode 100644 index 0000000..3460269 --- /dev/null +++ b/src/Api/MatchingContextApi.php @@ -0,0 +1,1100 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index. + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index. + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation apiNoticesMatchingContextsGetSubresourceNoticeSubresource. + * + * Retrieves a Notice resource. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\InlineResponse200 + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresource($id, $page = 1) + { + [$response] = $this->apiNoticesMatchingContextsGetSubresourceNoticeSubresourceWithHttpInfo($id, $page); + + return $response; + } + + /** + * Operation apiNoticesMatchingContextsGetSubresourceNoticeSubresourceWithHttpInfo. + * + * Retrieves a Notice resource. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\InlineResponse200, HTTP status code, HTTP response headers (array of strings) + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresourceWithHttpInfo($id, $page = 1) + { + $request = $this->apiNoticesMatchingContextsGetSubresourceNoticeSubresourceRequest($id, $page); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 200: + if ('\DisMoi\Client\Model\InlineResponse200' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\InlineResponse200', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\InlineResponse200'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\InlineResponse200', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsync. + * + * Retrieves a Notice resource. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsync($id, $page = 1) + { + return $this->apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsyncWithHttpInfo($id, $page) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsyncWithHttpInfo. + * + * Retrieves a Notice resource. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsyncWithHttpInfo($id, $page = 1) + { + $returnType = '\DisMoi\Client\Model\InlineResponse200'; + $request = $this->apiNoticesMatchingContextsGetSubresourceNoticeSubresourceRequest($id, $page); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'apiNoticesMatchingContextsGetSubresourceNoticeSubresource'. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresourceRequest($id, $page = 1) + { + // verify the required parameter 'id' is set + if (null === $id || (\is_array($id) && 0 === \count($id))) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling apiNoticesMatchingContextsGetSubresourceNoticeSubresource'); + } + + $resourcePath = '/v4/notices/{id}/matching_contexts'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (\is_array($page)) { + $page = ObjectSerializer::serializeCollection($page, 'form', true); + } + if (null !== $page) { + $queryParams['page'] = $page; + } + + // path params + if (null !== $id) { + $resourcePath = str_replace( + '{'.'id'.'}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/ld+json', 'application/json', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/ld+json', 'application/json', 'text/html'], + [] + ); + } + + // for model (json/xml) + if (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'GET', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getMatchingContextCollection. + * + * Retrieves the collection of MatchingContext resources. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\InlineResponse200 + */ + public function getMatchingContextCollection($page = 1) + { + [$response] = $this->getMatchingContextCollectionWithHttpInfo($page); + + return $response; + } + + /** + * Operation getMatchingContextCollectionWithHttpInfo. + * + * Retrieves the collection of MatchingContext resources. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\InlineResponse200, HTTP status code, HTTP response headers (array of strings) + */ + public function getMatchingContextCollectionWithHttpInfo($page = 1) + { + $request = $this->getMatchingContextCollectionRequest($page); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 200: + if ('\DisMoi\Client\Model\InlineResponse200' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\InlineResponse200', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\InlineResponse200'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\InlineResponse200', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getMatchingContextCollectionAsync. + * + * Retrieves the collection of MatchingContext resources. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMatchingContextCollectionAsync($page = 1) + { + return $this->getMatchingContextCollectionAsyncWithHttpInfo($page) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getMatchingContextCollectionAsyncWithHttpInfo. + * + * Retrieves the collection of MatchingContext resources. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMatchingContextCollectionAsyncWithHttpInfo($page = 1) + { + $returnType = '\DisMoi\Client\Model\InlineResponse200'; + $request = $this->getMatchingContextCollectionRequest($page); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'getMatchingContextCollection'. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function getMatchingContextCollectionRequest($page = 1) + { + $resourcePath = '/v4/matching_contexts'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (\is_array($page)) { + $page = ObjectSerializer::serializeCollection($page, 'form', true); + } + if (null !== $page) { + $queryParams['page'] = $page; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/ld+json', 'application/json', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/ld+json', 'application/json', 'text/html'], + [] + ); + } + + // for model (json/xml) + if (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'GET', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getMatchingContextItem. + * + * Retrieves a MatchingContext resource. + * + * @param string $id Resource identifier (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\MatchingContextJsonldRead + */ + public function getMatchingContextItem($id) + { + [$response] = $this->getMatchingContextItemWithHttpInfo($id); + + return $response; + } + + /** + * Operation getMatchingContextItemWithHttpInfo. + * + * Retrieves a MatchingContext resource. + * + * @param string $id Resource identifier (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\MatchingContextJsonldRead, HTTP status code, HTTP response headers (array of strings) + */ + public function getMatchingContextItemWithHttpInfo($id) + { + $request = $this->getMatchingContextItemRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 200: + if ('\DisMoi\Client\Model\MatchingContextJsonldRead' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\MatchingContextJsonldRead', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\MatchingContextJsonldRead'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\MatchingContextJsonldRead', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getMatchingContextItemAsync. + * + * Retrieves a MatchingContext resource. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMatchingContextItemAsync($id) + { + return $this->getMatchingContextItemAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getMatchingContextItemAsyncWithHttpInfo. + * + * Retrieves a MatchingContext resource. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getMatchingContextItemAsyncWithHttpInfo($id) + { + $returnType = '\DisMoi\Client\Model\MatchingContextJsonldRead'; + $request = $this->getMatchingContextItemRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'getMatchingContextItem'. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function getMatchingContextItemRequest($id) + { + // verify the required parameter 'id' is set + if (null === $id || (\is_array($id) && 0 === \count($id))) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling getMatchingContextItem'); + } + + $resourcePath = '/v4/matching_contexts/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if (null !== $id) { + $resourcePath = str_replace( + '{'.'id'.'}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/ld+json', 'application/json', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/ld+json', 'application/json', 'text/html'], + [] + ); + } + + // for model (json/xml) + if (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'GET', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postMatchingContextCollection. + * + * Creates a MatchingContext resource. + * + * @param \DisMoi\Client\Model\MatchingContextJsonldCreate $matchingContextJsonldCreate The new MatchingContext resource (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\MatchingContextJsonldRead + */ + public function postMatchingContextCollection($matchingContextJsonldCreate) + { + [$response] = $this->postMatchingContextCollectionWithHttpInfo($matchingContextJsonldCreate); + + return $response; + } + + /** + * Operation postMatchingContextCollectionWithHttpInfo. + * + * Creates a MatchingContext resource. + * + * @param \DisMoi\Client\Model\MatchingContextJsonldCreate $matchingContextJsonldCreate The new MatchingContext resource (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\MatchingContextJsonldRead, HTTP status code, HTTP response headers (array of strings) + */ + public function postMatchingContextCollectionWithHttpInfo($matchingContextJsonldCreate) + { + $request = $this->postMatchingContextCollectionRequest($matchingContextJsonldCreate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 201: + if ('\DisMoi\Client\Model\MatchingContextJsonldRead' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\MatchingContextJsonldRead', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\MatchingContextJsonldRead'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\MatchingContextJsonldRead', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation postMatchingContextCollectionAsync. + * + * Creates a MatchingContext resource. + * + * @param \DisMoi\Client\Model\MatchingContextJsonldCreate $matchingContextJsonldCreate The new MatchingContext resource (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postMatchingContextCollectionAsync($matchingContextJsonldCreate) + { + return $this->postMatchingContextCollectionAsyncWithHttpInfo($matchingContextJsonldCreate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postMatchingContextCollectionAsyncWithHttpInfo. + * + * Creates a MatchingContext resource. + * + * @param \DisMoi\Client\Model\MatchingContextJsonldCreate $matchingContextJsonldCreate The new MatchingContext resource (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postMatchingContextCollectionAsyncWithHttpInfo($matchingContextJsonldCreate) + { + $returnType = '\DisMoi\Client\Model\MatchingContextJsonldRead'; + $request = $this->postMatchingContextCollectionRequest($matchingContextJsonldCreate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'postMatchingContextCollection'. + * + * @param \DisMoi\Client\Model\MatchingContextJsonldCreate $matchingContextJsonldCreate The new MatchingContext resource (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function postMatchingContextCollectionRequest($matchingContextJsonldCreate) + { + // verify the required parameter 'matchingContextJsonldCreate' is set + if (null === $matchingContextJsonldCreate || (\is_array($matchingContextJsonldCreate) && 0 === \count($matchingContextJsonldCreate))) { + throw new \InvalidArgumentException('Missing the required parameter $matchingContextJsonldCreate when calling postMatchingContextCollection'); + } + + $resourcePath = '/v4/matching_contexts'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/ld+json', 'application/json', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/ld+json', 'application/json', 'text/html'], + ['application/ld+json', 'application/json', 'text/html'] + ); + } + + // for model (json/xml) + if (isset($matchingContextJsonldCreate)) { + if ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($matchingContextJsonldCreate)); + } else { + $httpBody = $matchingContextJsonldCreate; + } + } elseif (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'POST', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option. + * + * @throws \RuntimeException on file opening failure + * + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if ( ! $options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/src/Api/NoticeApi.php b/src/Api/NoticeApi.php new file mode 100644 index 0000000..9ef2641 --- /dev/null +++ b/src/Api/NoticeApi.php @@ -0,0 +1,1299 @@ +client = $client ?: new Client(); + $this->config = $config ?: new Configuration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index. + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex($hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index. + * + * @return int Host index + */ + public function getHostIndex() + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig() + { + return $this->config; + } + + /** + * Operation apiNoticesMatchingContextsGetSubresourceNoticeSubresource. + * + * Retrieves a Notice resource. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\InlineResponse200 + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresource($id, $page = 1) + { + [$response] = $this->apiNoticesMatchingContextsGetSubresourceNoticeSubresourceWithHttpInfo($id, $page); + + return $response; + } + + /** + * Operation apiNoticesMatchingContextsGetSubresourceNoticeSubresourceWithHttpInfo. + * + * Retrieves a Notice resource. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\InlineResponse200, HTTP status code, HTTP response headers (array of strings) + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresourceWithHttpInfo($id, $page = 1) + { + $request = $this->apiNoticesMatchingContextsGetSubresourceNoticeSubresourceRequest($id, $page); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 200: + if ('\DisMoi\Client\Model\InlineResponse200' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\InlineResponse200', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\InlineResponse200'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\InlineResponse200', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsync. + * + * Retrieves a Notice resource. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsync($id, $page = 1) + { + return $this->apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsyncWithHttpInfo($id, $page) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsyncWithHttpInfo. + * + * Retrieves a Notice resource. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresourceAsyncWithHttpInfo($id, $page = 1) + { + $returnType = '\DisMoi\Client\Model\InlineResponse200'; + $request = $this->apiNoticesMatchingContextsGetSubresourceNoticeSubresourceRequest($id, $page); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'apiNoticesMatchingContextsGetSubresourceNoticeSubresource'. + * + * @param string $id Notice identifier (required) + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function apiNoticesMatchingContextsGetSubresourceNoticeSubresourceRequest($id, $page = 1) + { + // verify the required parameter 'id' is set + if (null === $id || (\is_array($id) && 0 === \count($id))) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling apiNoticesMatchingContextsGetSubresourceNoticeSubresource'); + } + + $resourcePath = '/v4/notices/{id}/matching_contexts'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (\is_array($page)) { + $page = ObjectSerializer::serializeCollection($page, 'form', true); + } + if (null !== $page) { + $queryParams['page'] = $page; + } + + // path params + if (null !== $id) { + $resourcePath = str_replace( + '{'.'id'.'}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/ld+json', 'application/json', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/ld+json', 'application/json', 'text/html'], + [] + ); + } + + // for model (json/xml) + if (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'GET', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation deleteNoticeItem. + * + * Removes the Notice resource. + * + * @param string $id Resource identifier (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return void + */ + public function deleteNoticeItem($id): void + { + $this->deleteNoticeItemWithHttpInfo($id); + } + + /** + * Operation deleteNoticeItemWithHttpInfo. + * + * Removes the Notice resource. + * + * @param string $id Resource identifier (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteNoticeItemWithHttpInfo($id) + { + $request = $this->deleteNoticeItemRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + } + throw $e; + } + } + + /** + * Operation deleteNoticeItemAsync. + * + * Removes the Notice resource. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteNoticeItemAsync($id) + { + return $this->deleteNoticeItemAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteNoticeItemAsyncWithHttpInfo. + * + * Removes the Notice resource. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function deleteNoticeItemAsyncWithHttpInfo($id) + { + $returnType = ''; + $request = $this->deleteNoticeItemRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'deleteNoticeItem'. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteNoticeItemRequest($id) + { + // verify the required parameter 'id' is set + if (null === $id || (\is_array($id) && 0 === \count($id))) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling deleteNoticeItem'); + } + + $resourcePath = '/v4/notices/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if (null !== $id) { + $resourcePath = str_replace( + '{'.'id'.'}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + [] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + [], + [] + ); + } + + // for model (json/xml) + if (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'DELETE', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getNoticeCollection. + * + * Retrieves the collection of Notice resources. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\InlineResponse2001 + */ + public function getNoticeCollection($page = 1) + { + [$response] = $this->getNoticeCollectionWithHttpInfo($page); + + return $response; + } + + /** + * Operation getNoticeCollectionWithHttpInfo. + * + * Retrieves the collection of Notice resources. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\InlineResponse2001, HTTP status code, HTTP response headers (array of strings) + */ + public function getNoticeCollectionWithHttpInfo($page = 1) + { + $request = $this->getNoticeCollectionRequest($page); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 200: + if ('\DisMoi\Client\Model\InlineResponse2001' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\InlineResponse2001', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\InlineResponse2001'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\InlineResponse2001', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getNoticeCollectionAsync. + * + * Retrieves the collection of Notice resources. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getNoticeCollectionAsync($page = 1) + { + return $this->getNoticeCollectionAsyncWithHttpInfo($page) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getNoticeCollectionAsyncWithHttpInfo. + * + * Retrieves the collection of Notice resources. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getNoticeCollectionAsyncWithHttpInfo($page = 1) + { + $returnType = '\DisMoi\Client\Model\InlineResponse2001'; + $request = $this->getNoticeCollectionRequest($page); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'getNoticeCollection'. + * + * @param int $page The collection page number (optional, default to 1) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function getNoticeCollectionRequest($page = 1) + { + $resourcePath = '/v4/notices'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (\is_array($page)) { + $page = ObjectSerializer::serializeCollection($page, 'form', true); + } + if (null !== $page) { + $queryParams['page'] = $page; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/ld+json', 'application/json', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/ld+json', 'application/json', 'text/html'], + [] + ); + } + + // for model (json/xml) + if (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'GET', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getNoticeItem. + * + * Retrieves a Notice resource. + * + * @param string $id Resource identifier (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\NoticeJsonldRead + */ + public function getNoticeItem($id) + { + [$response] = $this->getNoticeItemWithHttpInfo($id); + + return $response; + } + + /** + * Operation getNoticeItemWithHttpInfo. + * + * Retrieves a Notice resource. + * + * @param string $id Resource identifier (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\NoticeJsonldRead, HTTP status code, HTTP response headers (array of strings) + */ + public function getNoticeItemWithHttpInfo($id) + { + $request = $this->getNoticeItemRequest($id); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 200: + if ('\DisMoi\Client\Model\NoticeJsonldRead' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\NoticeJsonldRead', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\NoticeJsonldRead'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\NoticeJsonldRead', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getNoticeItemAsync. + * + * Retrieves a Notice resource. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getNoticeItemAsync($id) + { + return $this->getNoticeItemAsyncWithHttpInfo($id) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getNoticeItemAsyncWithHttpInfo. + * + * Retrieves a Notice resource. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getNoticeItemAsyncWithHttpInfo($id) + { + $returnType = '\DisMoi\Client\Model\NoticeJsonldRead'; + $request = $this->getNoticeItemRequest($id); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'getNoticeItem'. + * + * @param string $id Resource identifier (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function getNoticeItemRequest($id) + { + // verify the required parameter 'id' is set + if (null === $id || (\is_array($id) && 0 === \count($id))) { + throw new \InvalidArgumentException('Missing the required parameter $id when calling getNoticeItem'); + } + + $resourcePath = '/v4/notices/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // path params + if (null !== $id) { + $resourcePath = str_replace( + '{'.'id'.'}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/ld+json', 'application/json', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/ld+json', 'application/json', 'text/html'], + [] + ); + } + + // for model (json/xml) + if (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'GET', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postNoticeCollection. + * + * Creates a Notice resource. + * + * @param \DisMoi\Client\Model\NoticeJsonldCreate $noticeJsonldCreate The new Notice resource (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return \DisMoi\Client\Model\NoticeJsonldRead + */ + public function postNoticeCollection($noticeJsonldCreate) + { + [$response] = $this->postNoticeCollectionWithHttpInfo($noticeJsonldCreate); + + return $response; + } + + /** + * Operation postNoticeCollectionWithHttpInfo. + * + * Creates a Notice resource. + * + * @param \DisMoi\Client\Model\NoticeJsonldCreate $noticeJsonldCreate The new Notice resource (required) + * + * @throws \DisMoi\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * + * @return array of \DisMoi\Client\Model\NoticeJsonldRead, HTTP status code, HTTP response headers (array of strings) + */ + public function postNoticeCollectionWithHttpInfo($noticeJsonldCreate) + { + $request = $this->postNoticeCollectionRequest($noticeJsonldCreate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException("[{$e->getCode()}] {$e->getMessage()}", (int) $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? (string) $e->getResponse()->getBody() : null); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, (string) $request->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + + switch ($statusCode) { + case 201: + if ('\DisMoi\Client\Model\NoticeJsonldRead' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, '\DisMoi\Client\Model\NoticeJsonldRead', []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } + + $returnType = '\DisMoi\Client\Model\NoticeJsonldRead'; + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\DisMoi\Client\Model\NoticeJsonldRead', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation postNoticeCollectionAsync. + * + * Creates a Notice resource. + * + * @param \DisMoi\Client\Model\NoticeJsonldCreate $noticeJsonldCreate The new Notice resource (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postNoticeCollectionAsync($noticeJsonldCreate) + { + return $this->postNoticeCollectionAsyncWithHttpInfo($noticeJsonldCreate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postNoticeCollectionAsyncWithHttpInfo. + * + * Creates a Notice resource. + * + * @param \DisMoi\Client\Model\NoticeJsonldCreate $noticeJsonldCreate The new Notice resource (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postNoticeCollectionAsyncWithHttpInfo($noticeJsonldCreate) + { + $returnType = '\DisMoi\Client\Model\NoticeJsonldRead'; + $request = $this->postNoticeCollectionRequest($noticeJsonldCreate); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ('\SplFileObject' === $returnType) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders(), + ]; + }, + function ($exception): void { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException(sprintf('[%d] Error connecting to the API (%s)', $statusCode, $exception->getRequest()->getUri()), $statusCode, $response->getHeaders(), (string) $response->getBody()); + } + ); + } + + /** + * Create request for operation 'postNoticeCollection'. + * + * @param \DisMoi\Client\Model\NoticeJsonldCreate $noticeJsonldCreate The new Notice resource (required) + * + * @throws \InvalidArgumentException + * + * @return \GuzzleHttp\Psr7\Request + */ + public function postNoticeCollectionRequest($noticeJsonldCreate) + { + // verify the required parameter 'noticeJsonldCreate' is set + if (null === $noticeJsonldCreate || (\is_array($noticeJsonldCreate) && 0 === \count($noticeJsonldCreate))) { + throw new \InvalidArgumentException('Missing the required parameter $noticeJsonldCreate when calling postNoticeCollection'); + } + + $resourcePath = '/v4/notices'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/ld+json', 'application/json', 'text/html'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/ld+json', 'application/json', 'text/html'], + ['application/ld+json', 'application/json', 'text/html'] + ); + } + + // for model (json/xml) + if (isset($noticeJsonldCreate)) { + if ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($noticeJsonldCreate)); + } else { + $httpBody = $noticeJsonldCreate; + } + } elseif (\count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = \is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem, + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + } elseif ('application/json' === $headers['Content-Type']) { + $httpBody = \GuzzleHttp\json_encode($formParams); + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if (null !== $apiKey) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + + return new Request( + 'POST', + $this->config->getHost().$resourcePath.($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Create http client option. + * + * @throws \RuntimeException on file opening failure + * + * @return array of http client options + */ + protected function createHttpClientOption() + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if ( ! $options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: '.$this->config->getDebugFile()); + } + } + + return $options; + } +} diff --git a/src/ApiException.php b/src/ApiException.php new file mode 100644 index 0000000..861d6a3 --- /dev/null +++ b/src/ApiException.php @@ -0,0 +1,100 @@ +responseHeaders = $responseHeaders; + $this->responseBody = $responseBody; + } + + /** + * Gets the HTTP response header. + * + * @return string[]|null HTTP response header + */ + public function getResponseHeaders() + { + return $this->responseHeaders; + } + + /** + * Gets the HTTP body of the server response either as Json or string. + * + * @return \stdClass|string|null HTTP body of the server response either as \stdClass or string + */ + public function getResponseBody() + { + return $this->responseBody; + } + + /** + * Sets the deseralized response object (during deserialization). + * + * @param mixed $obj Deserialized response object + * + * @return void + */ + public function setResponseObject($obj): void + { + $this->responseObject = $obj; + } + + /** + * Gets the deseralized response object (during deserialization). + * + * @return mixed the deserialized response object + */ + public function getResponseObject() + { + return $this->responseObject; + } +} diff --git a/src/Configuration.php b/src/Configuration.php new file mode 100644 index 0000000..07643d7 --- /dev/null +++ b/src/Configuration.php @@ -0,0 +1,480 @@ +tempFolderPath = sys_get_temp_dir(); + } + + /** + * Sets API key. + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $key API key or token + * + * @return $this + */ + public function setApiKey($apiKeyIdentifier, $key) + { + $this->apiKeys[$apiKeyIdentifier] = $key; + + return $this; + } + + /** + * Gets API key. + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return string|null API key or token + */ + public function getApiKey($apiKeyIdentifier) + { + return $this->apiKeys[$apiKeyIdentifier] ?? null; + } + + /** + * Sets the prefix for API key (e.g. Bearer). + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $prefix API key prefix, e.g. Bearer + * + * @return $this + */ + public function setApiKeyPrefix($apiKeyIdentifier, $prefix) + { + $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + + return $this; + } + + /** + * Gets API key prefix. + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return string|null + */ + public function getApiKeyPrefix($apiKeyIdentifier) + { + return $this->apiKeyPrefixes[$apiKeyIdentifier] ?? null; + } + + /** + * Sets the access token for OAuth. + * + * @param string $accessToken Token for OAuth + * + * @return $this + */ + public function setAccessToken($accessToken) + { + $this->accessToken = $accessToken; + + return $this; + } + + /** + * Gets the access token for OAuth. + * + * @return string Access token for OAuth + */ + public function getAccessToken() + { + return $this->accessToken; + } + + /** + * Sets the username for HTTP basic authentication. + * + * @param string $username Username for HTTP basic authentication + * + * @return $this + */ + public function setUsername($username) + { + $this->username = $username; + + return $this; + } + + /** + * Gets the username for HTTP basic authentication. + * + * @return string Username for HTTP basic authentication + */ + public function getUsername() + { + return $this->username; + } + + /** + * Sets the password for HTTP basic authentication. + * + * @param string $password Password for HTTP basic authentication + * + * @return $this + */ + public function setPassword($password) + { + $this->password = $password; + + return $this; + } + + /** + * Gets the password for HTTP basic authentication. + * + * @return string Password for HTTP basic authentication + */ + public function getPassword() + { + return $this->password; + } + + /** + * Sets the host. + * + * @param string $host Host + * + * @return $this + */ + public function setHost($host) + { + $this->host = $host; + + return $this; + } + + /** + * Gets the host. + * + * @return string Host + */ + public function getHost() + { + return $this->host; + } + + /** + * Sets the user agent of the api client. + * + * @param string $userAgent the user agent of the api client + * + * @throws \InvalidArgumentException + * + * @return $this + */ + public function setUserAgent($userAgent) + { + if ( ! \is_string($userAgent)) { + throw new \InvalidArgumentException('User-agent must be a string.'); + } + + $this->userAgent = $userAgent; + + return $this; + } + + /** + * Gets the user agent of the api client. + * + * @return string user agent + */ + public function getUserAgent() + { + return $this->userAgent; + } + + /** + * Sets debug flag. + * + * @param bool $debug Debug flag + * + * @return $this + */ + public function setDebug($debug) + { + $this->debug = $debug; + + return $this; + } + + /** + * Gets the debug flag. + * + * @return bool + */ + public function getDebug() + { + return $this->debug; + } + + /** + * Sets the debug file. + * + * @param string $debugFile Debug file + * + * @return $this + */ + public function setDebugFile($debugFile) + { + $this->debugFile = $debugFile; + + return $this; + } + + /** + * Gets the debug file. + * + * @return string + */ + public function getDebugFile() + { + return $this->debugFile; + } + + /** + * Sets the temp folder path. + * + * @param string $tempFolderPath Temp folder path + * + * @return $this + */ + public function setTempFolderPath($tempFolderPath) + { + $this->tempFolderPath = $tempFolderPath; + + return $this; + } + + /** + * Gets the temp folder path. + * + * @return string Temp folder path + */ + public function getTempFolderPath() + { + return $this->tempFolderPath; + } + + /** + * Gets the default configuration instance. + * + * @return Configuration + */ + public static function getDefaultConfiguration() + { + if (null === self::$defaultConfiguration) { + self::$defaultConfiguration = new self(); + self::$defaultConfiguration->setApiKeyPrefix('Authorization', 'Bearer'); + } + + return self::$defaultConfiguration; + } + + /** + * Sets the detault configuration instance. + * + * @param Configuration $config An instance of the Configuration Object + * + * @return void + */ + public static function setDefaultConfiguration(self $config): void + { + self::$defaultConfiguration = $config; + } + + /** + * Gets the essential information for debugging. + * + * @return string The report for debugging + */ + public static function toDebugReport() + { + $report = 'PHP SDK (DisMoi\Client) Debug Report:'.\PHP_EOL; + $report .= ' OS: '.php_uname().\PHP_EOL; + $report .= ' PHP Version: '.\PHP_VERSION.\PHP_EOL; + $report .= ' The version of the OpenAPI document: 4.0.0'.\PHP_EOL; + $report .= ' SDK Package Version: 0.0.1'.\PHP_EOL; + $report .= ' Temp Folder Path: '.self::getDefaultConfiguration()->getTempFolderPath().\PHP_EOL; + + return $report; + } + + /** + * Get API key (with prefix if set). + * + * @param string $apiKeyIdentifier name of apikey + * + * @return string|null API key with the prefix + */ + public function getApiKeyWithPrefix($apiKeyIdentifier) + { + $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); + $apiKey = $this->getApiKey($apiKeyIdentifier); + + if (null === $apiKey) { + return null; + } + + if (null === $prefix) { + $keyWithPrefix = $apiKey; + } else { + $keyWithPrefix = $prefix.' '.$apiKey; + } + + return $keyWithPrefix; + } + + /** + * Returns an array of host settings. + * + * @return array an array of host settings + */ + public function getHostSettings() + { + return [ + [ + 'url' => '', + 'description' => 'No description provided', + ], + ]; + } + + /** + * Returns URL based on the index and variables. + * + * @param int $index index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * + * @return string URL based on host settings + */ + public function getHostFromSettings($index, $variables = null) + { + if (null === $variables) { + $variables = []; + } + + $hosts = $this->getHostSettings(); + + // check array index out of bound + if ($index < 0 || $index >= \count($hosts)) { + throw new \InvalidArgumentException("Invalid index $index when selecting the host. Must be less than ".\count($hosts)); + } + + $host = $hosts[$index]; + $url = $host['url']; + + // go through variable and assign a value + foreach ($host['variables'] ?? [] as $name => $variable) { + if (\array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user + if (\in_array($variables[$name], $variable['enum_values'], true)) { // check to see if the value is in the enum + $url = str_replace('{'.$name.'}', $variables[$name], $url); + } else { + throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].'. Must be '.implode(',', $variable['enum_values']).'.'); + } + } else { + // use default value + $url = str_replace('{'.$name.'}', $variable['default_value'], $url); + } + } + + return $url; + } +} diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php new file mode 100644 index 0000000..26ac916 --- /dev/null +++ b/src/HeaderSelector.php @@ -0,0 +1,92 @@ +selectAcceptHeader($accept); + if (null !== $accept) { + $headers['Accept'] = $accept; + } + + $headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes); + + return $headers; + } + + /** + * @param string[] $accept + * + * @return array + */ + public function selectHeadersForMultipart($accept) + { + $headers = $this->selectHeaders($accept, []); + + unset($headers['Content-Type']); + + return $headers; + } + + /** + * Return the header 'Accept' based on an array of Accept provided. + * + * @param string[] $accept Array of header + * + * @return string|null Accept (e.g. application/json) + */ + private function selectAcceptHeader($accept) + { + if (0 === \count($accept) || (1 === \count($accept) && '' === $accept[0])) { + return null; + } + if ($jsonAccept = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept)) { + return implode(',', $jsonAccept); + } + + return implode(',', $accept); + } + + /** + * Return the content type based on an array of content-type provided. + * + * @param string[] $contentType Array fo content-type + * + * @return string Content-Type (e.g. application/json) + */ + private function selectContentTypeHeader($contentType) + { + if (0 === \count($contentType) || (1 === \count($contentType) && '' === $contentType[0])) { + return 'application/json'; + } + if (preg_grep("/application\/json/i", $contentType)) { + return 'application/json'; + } + + return implode(',', $contentType); + } +} diff --git a/src/Model/ContributorJsonldRead.php b/src/Model/ContributorJsonldRead.php new file mode 100644 index 0000000..c71f594 --- /dev/null +++ b/src/Model/ContributorJsonldRead.php @@ -0,0 +1,289 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class ContributorJsonldRead implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Contributor.jsonld-read'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '@context' => null, '@id' => null, '@type' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'context' => '@context', + 'id' => '@id', + 'type' => '@type', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + '@context' => 'setContext', + '@id' => 'setId', + '@type' => 'setType', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + '@context' => 'getContext', + '@id' => 'getId', + '@type' => 'getType', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['context'] = $data[self::$attributeMap['context']] ?? null; + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['type'] = $data[self::$attributeMap['type']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/Credentials.php b/src/Model/Credentials.php new file mode 100644 index 0000000..3314301 --- /dev/null +++ b/src/Model/Credentials.php @@ -0,0 +1,334 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Credentials implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Credentials'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'username' => 'string', + 'password' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'username' => null, 'password' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'username' => 'username', + 'password' => 'password', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'username' => 'setUsername', + 'password' => 'setPassword', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'username' => 'getUsername', + 'password' => 'getPassword', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['username'] = $data[self::$attributeMap['username']] ?? null; + $this->container['password'] = $data[self::$attributeMap['password']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets username. + * + * @return string|null + */ + public function getUsername() + { + return $this->container['username']; + } + + /** + * Sets username. + * + * @param string|null $username the username you chose during registration + * + * @return self + */ + public function setUsername($username) + { + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password. + * + * @return string|null + */ + public function getPassword() + { + return $this->container['password']; + } + + /** + * Sets password. + * + * @param string|null $password the password you chose during registration + * + * @return self + */ + public function setPassword($password) + { + $this->container['password'] = $password; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/InlineResponse200.php b/src/Model/InlineResponse200.php new file mode 100644 index 0000000..4a386be --- /dev/null +++ b/src/Model/InlineResponse200.php @@ -0,0 +1,405 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InlineResponse200 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'inline_response_200'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'hydra:member' => '\DisMoi\Client\Model\MatchingContextJsonldRead[]', + 'hydra:totalItems' => 'int', + 'hydra:view' => '\DisMoi\Client\Model\InlineResponse200HydraView', + 'hydra:search' => '\DisMoi\Client\Model\InlineResponse200HydraSearch', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'hydra:member' => null, 'hydra:totalItems' => null, 'hydra:view' => null, 'hydra:search' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'member' => 'hydra:member', + 'totalItems' => 'hydra:totalItems', + 'view' => 'hydra:view', + 'search' => 'hydra:search', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'hydra:member' => 'setMember', + 'hydra:totalItems' => 'setTotalItems', + 'hydra:view' => 'setView', + 'hydra:search' => 'setSearch', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'hydra:member' => 'getMember', + 'hydra:totalItems' => 'getTotalItems', + 'hydra:view' => 'getView', + 'hydra:search' => 'getSearch', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['member'] = $data[self::$attributeMap['member']] ?? null; + $this->container['totalItems'] = $data[self::$attributeMap['totalItems']] ?? null; + $this->container['view'] = $data[self::$attributeMap['view']] ?? null; + $this->container['search'] = $data[self::$attributeMap['search']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (null === $this->container['member']) { + $invalidProperties[] = "'member' can't be null"; + } + if (null !== $this->container['totalItems'] && ($this->container['totalItems'] < 0)) { + $invalidProperties[] = "invalid value for 'totalItems', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets member. + * + * @return \DisMoi\Client\Model\MatchingContextJsonldRead[] + */ + public function getMember() + { + return $this->container['member']; + } + + /** + * Sets member. + * + * @param \DisMoi\Client\Model\MatchingContextJsonldRead[] $member member + * + * @return self + */ + public function setMember($member) + { + $this->container['member'] = $member; + + return $this; + } + + /** + * Gets totalItems. + * + * @return int|null + */ + public function getTotalItems() + { + return $this->container['totalItems']; + } + + /** + * Sets totalItems. + * + * @param int|null $totalItems totalItems + * + * @return self + */ + public function setTotalItems($totalItems) + { + if (null !== $totalItems && ($totalItems < 0)) { + throw new \InvalidArgumentException('invalid value for $totalItems when calling InlineResponse200., must be bigger than or equal to 0.'); + } + + $this->container['totalItems'] = $totalItems; + + return $this; + } + + /** + * Gets view. + * + * @return \DisMoi\Client\Model\InlineResponse200HydraView|null + */ + public function getView() + { + return $this->container['view']; + } + + /** + * Sets view. + * + * @param \DisMoi\Client\Model\InlineResponse200HydraView|null $view view + * + * @return self + */ + public function setView($view) + { + $this->container['view'] = $view; + + return $this; + } + + /** + * Gets search. + * + * @return \DisMoi\Client\Model\InlineResponse200HydraSearch|null + */ + public function getSearch() + { + return $this->container['search']; + } + + /** + * Sets search. + * + * @param \DisMoi\Client\Model\InlineResponse200HydraSearch|null $search search + * + * @return self + */ + public function setSearch($search) + { + $this->container['search'] = $search; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/InlineResponse2001.php b/src/Model/InlineResponse2001.php new file mode 100644 index 0000000..baf54be --- /dev/null +++ b/src/Model/InlineResponse2001.php @@ -0,0 +1,405 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InlineResponse2001 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'inline_response_200_1'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'hydra:member' => '\DisMoi\Client\Model\NoticeJsonldRead[]', + 'hydra:totalItems' => 'int', + 'hydra:view' => '\DisMoi\Client\Model\InlineResponse200HydraView', + 'hydra:search' => '\DisMoi\Client\Model\InlineResponse200HydraSearch', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'hydra:member' => null, 'hydra:totalItems' => null, 'hydra:view' => null, 'hydra:search' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'member' => 'hydra:member', + 'totalItems' => 'hydra:totalItems', + 'view' => 'hydra:view', + 'search' => 'hydra:search', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'hydra:member' => 'setMember', + 'hydra:totalItems' => 'setTotalItems', + 'hydra:view' => 'setView', + 'hydra:search' => 'setSearch', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'hydra:member' => 'getMember', + 'hydra:totalItems' => 'getTotalItems', + 'hydra:view' => 'getView', + 'hydra:search' => 'getSearch', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['member'] = $data[self::$attributeMap['member']] ?? null; + $this->container['totalItems'] = $data[self::$attributeMap['totalItems']] ?? null; + $this->container['view'] = $data[self::$attributeMap['view']] ?? null; + $this->container['search'] = $data[self::$attributeMap['search']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (null === $this->container['member']) { + $invalidProperties[] = "'member' can't be null"; + } + if (null !== $this->container['totalItems'] && ($this->container['totalItems'] < 0)) { + $invalidProperties[] = "invalid value for 'totalItems', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets member. + * + * @return \DisMoi\Client\Model\NoticeJsonldRead[] + */ + public function getMember() + { + return $this->container['member']; + } + + /** + * Sets member. + * + * @param \DisMoi\Client\Model\NoticeJsonldRead[] $member member + * + * @return self + */ + public function setMember($member) + { + $this->container['member'] = $member; + + return $this; + } + + /** + * Gets totalItems. + * + * @return int|null + */ + public function getTotalItems() + { + return $this->container['totalItems']; + } + + /** + * Sets totalItems. + * + * @param int|null $totalItems totalItems + * + * @return self + */ + public function setTotalItems($totalItems) + { + if (null !== $totalItems && ($totalItems < 0)) { + throw new \InvalidArgumentException('invalid value for $totalItems when calling InlineResponse2001., must be bigger than or equal to 0.'); + } + + $this->container['totalItems'] = $totalItems; + + return $this; + } + + /** + * Gets view. + * + * @return \DisMoi\Client\Model\InlineResponse200HydraView|null + */ + public function getView() + { + return $this->container['view']; + } + + /** + * Sets view. + * + * @param \DisMoi\Client\Model\InlineResponse200HydraView|null $view view + * + * @return self + */ + public function setView($view) + { + $this->container['view'] = $view; + + return $this; + } + + /** + * Gets search. + * + * @return \DisMoi\Client\Model\InlineResponse200HydraSearch|null + */ + public function getSearch() + { + return $this->container['search']; + } + + /** + * Sets search. + * + * @param \DisMoi\Client\Model\InlineResponse200HydraSearch|null $search search + * + * @return self + */ + public function setSearch($search) + { + $this->container['search'] = $search; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/InlineResponse200HydraSearch.php b/src/Model/InlineResponse200HydraSearch.php new file mode 100644 index 0000000..2fc421f --- /dev/null +++ b/src/Model/InlineResponse200HydraSearch.php @@ -0,0 +1,367 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InlineResponse200HydraSearch implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'inline_response_200_hydra_search'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'hydra:template' => 'string', + 'hydra:variableRepresentation' => 'string', + 'hydra:mapping' => '\DisMoi\Client\Model\InlineResponse200HydraSearchHydraMapping[]', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '@type' => null, 'hydra:template' => null, 'hydra:variableRepresentation' => null, 'hydra:mapping' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => '@type', + 'template' => 'hydra:template', + 'variableRepresentation' => 'hydra:variableRepresentation', + 'mapping' => 'hydra:mapping', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + '@type' => 'setType', + 'hydra:template' => 'setTemplate', + 'hydra:variableRepresentation' => 'setVariableRepresentation', + 'hydra:mapping' => 'setMapping', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + '@type' => 'getType', + 'hydra:template' => 'getTemplate', + 'hydra:variableRepresentation' => 'getVariableRepresentation', + 'hydra:mapping' => 'getMapping', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data[self::$attributeMap['type']] ?? null; + $this->container['template'] = $data[self::$attributeMap['template']] ?? null; + $this->container['variableRepresentation'] = $data[self::$attributeMap['variableRepresentation']] ?? null; + $this->container['mapping'] = $data[self::$attributeMap['mapping']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets template. + * + * @return string|null + */ + public function getTemplate() + { + return $this->container['template']; + } + + /** + * Sets template. + * + * @param string|null $template template + * + * @return self + */ + public function setTemplate($template) + { + $this->container['template'] = $template; + + return $this; + } + + /** + * Gets variableRepresentation. + * + * @return string|null + */ + public function getVariableRepresentation() + { + return $this->container['variableRepresentation']; + } + + /** + * Sets variableRepresentation. + * + * @param string|null $variableRepresentation variableRepresentation + * + * @return self + */ + public function setVariableRepresentation($variableRepresentation) + { + $this->container['variableRepresentation'] = $variableRepresentation; + + return $this; + } + + /** + * Gets mapping. + * + * @return \DisMoi\Client\Model\InlineResponse200HydraSearchHydraMapping[]|null + */ + public function getMapping() + { + return $this->container['mapping']; + } + + /** + * Sets mapping. + * + * @param \DisMoi\Client\Model\InlineResponse200HydraSearchHydraMapping[]|null $mapping mapping + * + * @return self + */ + public function setMapping($mapping) + { + $this->container['mapping'] = $mapping; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/InlineResponse200HydraSearchHydraMapping.php b/src/Model/InlineResponse200HydraSearchHydraMapping.php new file mode 100644 index 0000000..184897a --- /dev/null +++ b/src/Model/InlineResponse200HydraSearchHydraMapping.php @@ -0,0 +1,367 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InlineResponse200HydraSearchHydraMapping implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'inline_response_200_hydra_search_hydra_mapping'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'variable' => 'string', + 'property' => 'string', + 'required' => 'bool', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '@type' => null, 'variable' => null, 'property' => null, 'required' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'type' => '@type', + 'variable' => 'variable', + 'property' => 'property', + 'required' => 'required', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + '@type' => 'setType', + 'variable' => 'setVariable', + 'property' => 'setProperty', + 'required' => 'setRequired', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + '@type' => 'getType', + 'variable' => 'getVariable', + 'property' => 'getProperty', + 'required' => 'getRequired', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['type'] = $data[self::$attributeMap['type']] ?? null; + $this->container['variable'] = $data[self::$attributeMap['variable']] ?? null; + $this->container['property'] = $data[self::$attributeMap['property']] ?? null; + $this->container['required'] = $data[self::$attributeMap['required']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets variable. + * + * @return string|null + */ + public function getVariable() + { + return $this->container['variable']; + } + + /** + * Sets variable. + * + * @param string|null $variable variable + * + * @return self + */ + public function setVariable($variable) + { + $this->container['variable'] = $variable; + + return $this; + } + + /** + * Gets property. + * + * @return string|null + */ + public function getProperty() + { + return $this->container['property']; + } + + /** + * Sets property. + * + * @param string|null $property property + * + * @return self + */ + public function setProperty($property) + { + $this->container['property'] = $property; + + return $this; + } + + /** + * Gets required. + * + * @return bool|null + */ + public function getRequired() + { + return $this->container['required']; + } + + /** + * Sets required. + * + * @param bool|null $required required + * + * @return self + */ + public function setRequired($required) + { + $this->container['required'] = $required; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/InlineResponse200HydraView.php b/src/Model/InlineResponse200HydraView.php new file mode 100644 index 0000000..80fe48d --- /dev/null +++ b/src/Model/InlineResponse200HydraView.php @@ -0,0 +1,400 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class InlineResponse200HydraView implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'inline_response_200_hydra_view'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'hydra:first' => 'string', + 'hydra:last' => 'string', + 'hydra:previous' => 'string', + 'hydra:next' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '@id' => 'iri-reference', '@type' => null, 'hydra:first' => 'iri-reference', 'hydra:last' => 'iri-reference', 'hydra:previous' => 'iri-reference', 'hydra:next' => 'iri-reference', + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => '@id', + 'type' => '@type', + 'first' => 'hydra:first', + 'last' => 'hydra:last', + 'previous' => 'hydra:previous', + 'next' => 'hydra:next', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + '@id' => 'setId', + '@type' => 'setType', + 'hydra:first' => 'setFirst', + 'hydra:last' => 'setLast', + 'hydra:previous' => 'setPrevious', + 'hydra:next' => 'setNext', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + '@id' => 'getId', + '@type' => 'getType', + 'hydra:first' => 'getFirst', + 'hydra:last' => 'getLast', + 'hydra:previous' => 'getPrevious', + 'hydra:next' => 'getNext', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['type'] = $data[self::$attributeMap['type']] ?? null; + $this->container['first'] = $data[self::$attributeMap['first']] ?? null; + $this->container['last'] = $data[self::$attributeMap['last']] ?? null; + $this->container['previous'] = $data[self::$attributeMap['previous']] ?? null; + $this->container['next'] = $data[self::$attributeMap['next']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets first. + * + * @return string|null + */ + public function getFirst() + { + return $this->container['first']; + } + + /** + * Sets first. + * + * @param string|null $first first + * + * @return self + */ + public function setFirst($first) + { + $this->container['first'] = $first; + + return $this; + } + + /** + * Gets last. + * + * @return string|null + */ + public function getLast() + { + return $this->container['last']; + } + + /** + * Sets last. + * + * @param string|null $last last + * + * @return self + */ + public function setLast($last) + { + $this->container['last'] = $last; + + return $this; + } + + /** + * Gets previous. + * + * @return string|null + */ + public function getPrevious() + { + return $this->container['previous']; + } + + /** + * Sets previous. + * + * @param string|null $previous previous + * + * @return self + */ + public function setPrevious($previous) + { + $this->container['previous'] = $previous; + + return $this; + } + + /** + * Gets next. + * + * @return string|null + */ + public function getNext() + { + return $this->container['next']; + } + + /** + * Sets next. + * + * @param string|null $next next + * + * @return self + */ + public function setNext($next) + { + $this->container['next'] = $next; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/MatchingContextCreate.php b/src/Model/MatchingContextCreate.php new file mode 100644 index 0000000..d6f761c --- /dev/null +++ b/src/Model/MatchingContextCreate.php @@ -0,0 +1,515 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class MatchingContextCreate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MatchingContext-create'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'notice' => 'AnyOfNoticeCreate', + 'exampleUrl' => 'string', + 'urlRegex' => 'string', + 'excludeUrlRegex' => 'string', + 'description' => 'string', + 'querySelector' => 'string', + 'xpath' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, 'notice' => null, 'exampleUrl' => null, 'urlRegex' => null, 'excludeUrlRegex' => null, 'description' => null, 'querySelector' => null, 'xpath' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'notice' => 'notice', + 'exampleUrl' => 'exampleUrl', + 'urlRegex' => 'urlRegex', + 'excludeUrlRegex' => 'excludeUrlRegex', + 'description' => 'description', + 'querySelector' => 'querySelector', + 'xpath' => 'xpath', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'notice' => 'setNotice', + 'exampleUrl' => 'setExampleUrl', + 'urlRegex' => 'setUrlRegex', + 'excludeUrlRegex' => 'setExcludeUrlRegex', + 'description' => 'setDescription', + 'querySelector' => 'setQuerySelector', + 'xpath' => 'setXpath', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'notice' => 'getNotice', + 'exampleUrl' => 'getExampleUrl', + 'urlRegex' => 'getUrlRegex', + 'excludeUrlRegex' => 'getExcludeUrlRegex', + 'description' => 'getDescription', + 'querySelector' => 'getQuerySelector', + 'xpath' => 'getXpath', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['notice'] = $data[self::$attributeMap['notice']] ?? null; + $this->container['exampleUrl'] = $data[self::$attributeMap['exampleUrl']] ?? null; + $this->container['urlRegex'] = $data[self::$attributeMap['urlRegex']] ?? null; + $this->container['excludeUrlRegex'] = $data[self::$attributeMap['excludeUrlRegex']] ?? null; + $this->container['description'] = $data[self::$attributeMap['description']] ?? null; + $this->container['querySelector'] = $data[self::$attributeMap['querySelector']] ?? null; + $this->container['xpath'] = $data[self::$attributeMap['xpath']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (null === $this->container['urlRegex']) { + $invalidProperties[] = "'urlRegex' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets id. + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id. + * + * @param int|null $id an incremental, unique identifier for this matching context + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets notice. + * + * @return AnyOfNoticeCreate|null + */ + public function getNotice() + { + return $this->container['notice']; + } + + /** + * Sets notice. + * + * @param AnyOfNoticeCreate|null $notice this Notice this Matching Context tries to pinpoint on the Internet + * + * @return self + */ + public function setNotice($notice) + { + $this->container['notice'] = $notice; + + return $this; + } + + /** + * Gets exampleUrl. + * + * @return string|null + */ + public function getExampleUrl() + { + return $this->container['exampleUrl']; + } + + /** + * Sets exampleUrl. + * + * @param string|null $exampleUrl exampleUrl + * + * @return self + */ + public function setExampleUrl($exampleUrl) + { + $this->container['exampleUrl'] = $exampleUrl; + + return $this; + } + + /** + * Gets urlRegex. + * + * @return string + */ + public function getUrlRegex() + { + return $this->container['urlRegex']; + } + + /** + * Sets urlRegex. + * + * @param string $urlRegex urlRegex + * + * @return self + */ + public function setUrlRegex($urlRegex) + { + $this->container['urlRegex'] = $urlRegex; + + return $this; + } + + /** + * Gets excludeUrlRegex. + * + * @return string|null + */ + public function getExcludeUrlRegex() + { + return $this->container['excludeUrlRegex']; + } + + /** + * Sets excludeUrlRegex. + * + * @param string|null $excludeUrlRegex excludeUrlRegex + * + * @return self + */ + public function setExcludeUrlRegex($excludeUrlRegex) + { + $this->container['excludeUrlRegex'] = $excludeUrlRegex; + + return $this; + } + + /** + * Gets description. + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description. + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets querySelector. + * + * @return string|null + */ + public function getQuerySelector() + { + return $this->container['querySelector']; + } + + /** + * Sets querySelector. + * + * @param string|null $querySelector a CSS selector + * + * @return self + */ + public function setQuerySelector($querySelector) + { + $this->container['querySelector'] = $querySelector; + + return $this; + } + + /** + * Gets xpath. + * + * @return string|null + */ + public function getXpath() + { + return $this->container['xpath']; + } + + /** + * Sets xpath. + * + * @param string|null $xpath an XPath expression + * + * @return self + */ + public function setXpath($xpath) + { + $this->container['xpath'] = $xpath; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/MatchingContextJsonldCreate.php b/src/Model/MatchingContextJsonldCreate.php new file mode 100644 index 0000000..5c37e53 --- /dev/null +++ b/src/Model/MatchingContextJsonldCreate.php @@ -0,0 +1,527 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class MatchingContextJsonldCreate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MatchingContext.jsonld-create'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'notice' => 'AnyOfNoticeJsonldCreate', + 'exampleUrl' => 'string', + 'urlRegex' => 'string', + 'excludeUrlRegex' => 'string', + 'description' => 'string', + 'querySelector' => 'string', + 'xpath' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '@context' => null, '@id' => null, '@type' => null, 'id' => null, 'notice' => null, 'exampleUrl' => null, 'urlRegex' => null, 'excludeUrlRegex' => null, 'description' => null, 'querySelector' => null, 'xpath' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'context' => '@context', + 'id' => '@id', + 'type' => '@type', + 'id' => 'id', + 'notice' => 'notice', + 'exampleUrl' => 'exampleUrl', + 'urlRegex' => 'urlRegex', + 'excludeUrlRegex' => 'excludeUrlRegex', + 'description' => 'description', + 'querySelector' => 'querySelector', + 'xpath' => 'xpath', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + '@context' => 'setContext', + '@id' => 'setId', + '@type' => 'setType', + 'id' => 'setId', + 'notice' => 'setNotice', + 'exampleUrl' => 'setExampleUrl', + 'urlRegex' => 'setUrlRegex', + 'excludeUrlRegex' => 'setExcludeUrlRegex', + 'description' => 'setDescription', + 'querySelector' => 'setQuerySelector', + 'xpath' => 'setXpath', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + '@context' => 'getContext', + '@id' => 'getId', + '@type' => 'getType', + 'id' => 'getId', + 'notice' => 'getNotice', + 'exampleUrl' => 'getExampleUrl', + 'urlRegex' => 'getUrlRegex', + 'excludeUrlRegex' => 'getExcludeUrlRegex', + 'description' => 'getDescription', + 'querySelector' => 'getQuerySelector', + 'xpath' => 'getXpath', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['context'] = $data[self::$attributeMap['context']] ?? null; + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['type'] = $data[self::$attributeMap['type']] ?? null; + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['notice'] = $data[self::$attributeMap['notice']] ?? null; + $this->container['exampleUrl'] = $data[self::$attributeMap['exampleUrl']] ?? null; + $this->container['urlRegex'] = $data[self::$attributeMap['urlRegex']] ?? null; + $this->container['excludeUrlRegex'] = $data[self::$attributeMap['excludeUrlRegex']] ?? null; + $this->container['description'] = $data[self::$attributeMap['description']] ?? null; + $this->container['querySelector'] = $data[self::$attributeMap['querySelector']] ?? null; + $this->container['xpath'] = $data[self::$attributeMap['xpath']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (null === $this->container['urlRegex']) { + $invalidProperties[] = "'urlRegex' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets id. + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id. + * + * @param int|null $id an incremental, unique identifier for this matching context + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets notice. + * + * @return AnyOfNoticeJsonldCreate|null + */ + public function getNotice() + { + return $this->container['notice']; + } + + /** + * Sets notice. + * + * @param AnyOfNoticeJsonldCreate|null $notice this Notice this Matching Context tries to pinpoint on the Internet + * + * @return self + */ + public function setNotice($notice) + { + $this->container['notice'] = $notice; + + return $this; + } + + /** + * Gets exampleUrl. + * + * @return string|null + */ + public function getExampleUrl() + { + return $this->container['exampleUrl']; + } + + /** + * Sets exampleUrl. + * + * @param string|null $exampleUrl exampleUrl + * + * @return self + */ + public function setExampleUrl($exampleUrl) + { + $this->container['exampleUrl'] = $exampleUrl; + + return $this; + } + + /** + * Gets urlRegex. + * + * @return string + */ + public function getUrlRegex() + { + return $this->container['urlRegex']; + } + + /** + * Sets urlRegex. + * + * @param string $urlRegex urlRegex + * + * @return self + */ + public function setUrlRegex($urlRegex) + { + $this->container['urlRegex'] = $urlRegex; + + return $this; + } + + /** + * Gets excludeUrlRegex. + * + * @return string|null + */ + public function getExcludeUrlRegex() + { + return $this->container['excludeUrlRegex']; + } + + /** + * Sets excludeUrlRegex. + * + * @param string|null $excludeUrlRegex excludeUrlRegex + * + * @return self + */ + public function setExcludeUrlRegex($excludeUrlRegex) + { + $this->container['excludeUrlRegex'] = $excludeUrlRegex; + + return $this; + } + + /** + * Gets description. + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description. + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets querySelector. + * + * @return string|null + */ + public function getQuerySelector() + { + return $this->container['querySelector']; + } + + /** + * Sets querySelector. + * + * @param string|null $querySelector a CSS selector + * + * @return self + */ + public function setQuerySelector($querySelector) + { + $this->container['querySelector'] = $querySelector; + + return $this; + } + + /** + * Gets xpath. + * + * @return string|null + */ + public function getXpath() + { + return $this->container['xpath']; + } + + /** + * Sets xpath. + * + * @param string|null $xpath an XPath expression + * + * @return self + */ + public function setXpath($xpath) + { + $this->container['xpath'] = $xpath; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/MatchingContextJsonldRead.php b/src/Model/MatchingContextJsonldRead.php new file mode 100644 index 0000000..e1b5f18 --- /dev/null +++ b/src/Model/MatchingContextJsonldRead.php @@ -0,0 +1,469 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class MatchingContextJsonldRead implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MatchingContext.jsonld-read'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'exampleUrl' => 'string', + 'urlRegex' => 'string', + 'excludeUrlRegex' => 'string', + 'description' => 'string', + 'querySelector' => 'string', + 'xpath' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '@id' => null, '@type' => null, '@context' => null, 'exampleUrl' => null, 'urlRegex' => null, 'excludeUrlRegex' => null, 'description' => null, 'querySelector' => null, 'xpath' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => '@id', + 'type' => '@type', + 'context' => '@context', + 'exampleUrl' => 'exampleUrl', + 'urlRegex' => 'urlRegex', + 'excludeUrlRegex' => 'excludeUrlRegex', + 'description' => 'description', + 'querySelector' => 'querySelector', + 'xpath' => 'xpath', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + '@id' => 'setId', + '@type' => 'setType', + '@context' => 'setContext', + 'exampleUrl' => 'setExampleUrl', + 'urlRegex' => 'setUrlRegex', + 'excludeUrlRegex' => 'setExcludeUrlRegex', + 'description' => 'setDescription', + 'querySelector' => 'setQuerySelector', + 'xpath' => 'setXpath', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + '@id' => 'getId', + '@type' => 'getType', + '@context' => 'getContext', + 'exampleUrl' => 'getExampleUrl', + 'urlRegex' => 'getUrlRegex', + 'excludeUrlRegex' => 'getExcludeUrlRegex', + 'description' => 'getDescription', + 'querySelector' => 'getQuerySelector', + 'xpath' => 'getXpath', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['type'] = $data[self::$attributeMap['type']] ?? null; + $this->container['context'] = $data[self::$attributeMap['context']] ?? null; + $this->container['exampleUrl'] = $data[self::$attributeMap['exampleUrl']] ?? null; + $this->container['urlRegex'] = $data[self::$attributeMap['urlRegex']] ?? null; + $this->container['excludeUrlRegex'] = $data[self::$attributeMap['excludeUrlRegex']] ?? null; + $this->container['description'] = $data[self::$attributeMap['description']] ?? null; + $this->container['querySelector'] = $data[self::$attributeMap['querySelector']] ?? null; + $this->container['xpath'] = $data[self::$attributeMap['xpath']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (null === $this->container['urlRegex']) { + $invalidProperties[] = "'urlRegex' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets exampleUrl. + * + * @return string|null + */ + public function getExampleUrl() + { + return $this->container['exampleUrl']; + } + + /** + * Sets exampleUrl. + * + * @param string|null $exampleUrl exampleUrl + * + * @return self + */ + public function setExampleUrl($exampleUrl) + { + $this->container['exampleUrl'] = $exampleUrl; + + return $this; + } + + /** + * Gets urlRegex. + * + * @return string + */ + public function getUrlRegex() + { + return $this->container['urlRegex']; + } + + /** + * Sets urlRegex. + * + * @param string $urlRegex urlRegex + * + * @return self + */ + public function setUrlRegex($urlRegex) + { + $this->container['urlRegex'] = $urlRegex; + + return $this; + } + + /** + * Gets excludeUrlRegex. + * + * @return string|null + */ + public function getExcludeUrlRegex() + { + return $this->container['excludeUrlRegex']; + } + + /** + * Sets excludeUrlRegex. + * + * @param string|null $excludeUrlRegex excludeUrlRegex + * + * @return self + */ + public function setExcludeUrlRegex($excludeUrlRegex) + { + $this->container['excludeUrlRegex'] = $excludeUrlRegex; + + return $this; + } + + /** + * Gets description. + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description. + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets querySelector. + * + * @return string|null + */ + public function getQuerySelector() + { + return $this->container['querySelector']; + } + + /** + * Sets querySelector. + * + * @param string|null $querySelector a CSS selector + * + * @return self + */ + public function setQuerySelector($querySelector) + { + $this->container['querySelector'] = $querySelector; + + return $this; + } + + /** + * Gets xpath. + * + * @return string|null + */ + public function getXpath() + { + return $this->container['xpath']; + } + + /** + * Sets xpath. + * + * @param string|null $xpath an XPath expression + * + * @return self + */ + public function setXpath($xpath) + { + $this->container['xpath'] = $xpath; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/MatchingContextRead.php b/src/Model/MatchingContextRead.php new file mode 100644 index 0000000..13e058a --- /dev/null +++ b/src/Model/MatchingContextRead.php @@ -0,0 +1,457 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class MatchingContextRead implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'MatchingContext-read'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'exampleUrl' => 'string', + 'urlRegex' => 'string', + 'excludeUrlRegex' => 'string', + 'description' => 'string', + 'querySelector' => 'string', + 'xpath' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'exampleUrl' => null, 'urlRegex' => null, 'excludeUrlRegex' => null, 'description' => null, 'querySelector' => null, 'xpath' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'exampleUrl' => 'exampleUrl', + 'urlRegex' => 'urlRegex', + 'excludeUrlRegex' => 'excludeUrlRegex', + 'description' => 'description', + 'querySelector' => 'querySelector', + 'xpath' => 'xpath', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'exampleUrl' => 'setExampleUrl', + 'urlRegex' => 'setUrlRegex', + 'excludeUrlRegex' => 'setExcludeUrlRegex', + 'description' => 'setDescription', + 'querySelector' => 'setQuerySelector', + 'xpath' => 'setXpath', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'exampleUrl' => 'getExampleUrl', + 'urlRegex' => 'getUrlRegex', + 'excludeUrlRegex' => 'getExcludeUrlRegex', + 'description' => 'getDescription', + 'querySelector' => 'getQuerySelector', + 'xpath' => 'getXpath', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['exampleUrl'] = $data[self::$attributeMap['exampleUrl']] ?? null; + $this->container['urlRegex'] = $data[self::$attributeMap['urlRegex']] ?? null; + $this->container['excludeUrlRegex'] = $data[self::$attributeMap['excludeUrlRegex']] ?? null; + $this->container['description'] = $data[self::$attributeMap['description']] ?? null; + $this->container['querySelector'] = $data[self::$attributeMap['querySelector']] ?? null; + $this->container['xpath'] = $data[self::$attributeMap['xpath']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if (null === $this->container['urlRegex']) { + $invalidProperties[] = "'urlRegex' can't be null"; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets exampleUrl. + * + * @return string|null + */ + public function getExampleUrl() + { + return $this->container['exampleUrl']; + } + + /** + * Sets exampleUrl. + * + * @param string|null $exampleUrl exampleUrl + * + * @return self + */ + public function setExampleUrl($exampleUrl) + { + $this->container['exampleUrl'] = $exampleUrl; + + return $this; + } + + /** + * Gets urlRegex. + * + * @return string + */ + public function getUrlRegex() + { + return $this->container['urlRegex']; + } + + /** + * Sets urlRegex. + * + * @param string $urlRegex urlRegex + * + * @return self + */ + public function setUrlRegex($urlRegex) + { + $this->container['urlRegex'] = $urlRegex; + + return $this; + } + + /** + * Gets excludeUrlRegex. + * + * @return string|null + */ + public function getExcludeUrlRegex() + { + return $this->container['excludeUrlRegex']; + } + + /** + * Sets excludeUrlRegex. + * + * @param string|null $excludeUrlRegex excludeUrlRegex + * + * @return self + */ + public function setExcludeUrlRegex($excludeUrlRegex) + { + $this->container['excludeUrlRegex'] = $excludeUrlRegex; + + return $this; + } + + /** + * Gets description. + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description. + * + * @param string|null $description description + * + * @return self + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets querySelector. + * + * @return string|null + */ + public function getQuerySelector() + { + return $this->container['querySelector']; + } + + /** + * Sets querySelector. + * + * @param string|null $querySelector a CSS selector + * + * @return self + */ + public function setQuerySelector($querySelector) + { + $this->container['querySelector'] = $querySelector; + + return $this; + } + + /** + * Gets xpath. + * + * @return string|null + */ + public function getXpath() + { + return $this->container['xpath']; + } + + /** + * Sets xpath. + * + * @param string|null $xpath an XPath expression + * + * @return self + */ + public function setXpath($xpath) + { + $this->container['xpath'] = $xpath; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php new file mode 100644 index 0000000..a093a18 --- /dev/null +++ b/src/Model/ModelInterface.php @@ -0,0 +1,82 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NoticeCreate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Notice-create'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'visibility' => 'string', + 'matchingContexts' => '\DisMoi\Client\Model\MatchingContextCreate[]', + 'contributor' => 'string', + 'message' => 'string', + 'expires' => '\DateTime', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'visibility' => null, 'matchingContexts' => null, 'contributor' => 'iri-reference', 'message' => null, 'expires' => 'date-time', + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'visibility' => 'visibility', + 'matchingContexts' => 'matchingContexts', + 'contributor' => 'contributor', + 'message' => 'message', + 'expires' => 'expires', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'visibility' => 'setVisibility', + 'matchingContexts' => 'setMatchingContexts', + 'contributor' => 'setContributor', + 'message' => 'setMessage', + 'expires' => 'setExpires', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'visibility' => 'getVisibility', + 'matchingContexts' => 'getMatchingContexts', + 'contributor' => 'getContributor', + 'message' => 'getMessage', + 'expires' => 'getExpires', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['visibility'] = $data[self::$attributeMap['visibility']] ?? 'private'; + $this->container['matchingContexts'] = $data[self::$attributeMap['matchingContexts']] ?? null; + $this->container['contributor'] = $data[self::$attributeMap['contributor']] ?? null; + $this->container['message'] = $data[self::$attributeMap['message']] ?? null; + $this->container['expires'] = $data[self::$attributeMap['expires']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets visibility. + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility. + * + * @param string|null $visibility The visibility of the Notice. See `NoticeVisibility` for an enumeration of the allowed values: - \"public\": anyone may view this Notice - \"private\": Notice is only visible to Contributor - \"archived\": A deleted notice because it wasn't relevant anymore - \"draft\": Notice is only visible to Contributor, pending publication - \"question\": A question asked by a someone on a webpage. A question is not publicly visible. + * + * @return self + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + + return $this; + } + + /** + * Gets matchingContexts. + * + * @return \DisMoi\Client\Model\MatchingContextCreate[]|null + */ + public function getMatchingContexts() + { + return $this->container['matchingContexts']; + } + + /** + * Sets matchingContexts. + * + * @param \DisMoi\Client\Model\MatchingContextCreate[]|null $matchingContexts matchingContexts + * + * @return self + */ + public function setMatchingContexts($matchingContexts) + { + $this->container['matchingContexts'] = $matchingContexts; + + return $this; + } + + /** + * Gets contributor. + * + * @return string|null + */ + public function getContributor() + { + return $this->container['contributor']; + } + + /** + * Sets contributor. + * + * @param string|null $contributor the Contributor who submitted the Notice + * + * @return self + */ + public function setContributor($contributor) + { + $this->container['contributor'] = $contributor; + + return $this; + } + + /** + * Gets message. + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message. + * + * @param string|null $message The raw message attached to the Notice, as given by the Contributor. It is unsafe to read from it, prefer reading from `strippedMessage`. + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets expires. + * + * @return \DateTime|null + */ + public function getExpires() + { + return $this->container['expires']; + } + + /** + * Sets expires. + * + * @param \DateTime|null $expires expiration date of the notice, in the ISO8601 format + * + * @return self + */ + public function setExpires($expires) + { + $this->container['expires'] = $expires; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/NoticeJsonldCreate.php b/src/Model/NoticeJsonldCreate.php new file mode 100644 index 0000000..94c8465 --- /dev/null +++ b/src/Model/NoticeJsonldCreate.php @@ -0,0 +1,434 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NoticeJsonldCreate implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Notice.jsonld-create'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'visibility' => 'string', + 'matchingContexts' => '\DisMoi\Client\Model\MatchingContextJsonldCreate[]', + 'contributor' => 'string', + 'message' => 'string', + 'expires' => '\DateTime', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '@context' => null, '@id' => null, '@type' => null, 'visibility' => null, 'matchingContexts' => null, 'contributor' => 'iri-reference', 'message' => null, 'expires' => 'date-time', + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'context' => '@context', + 'id' => '@id', + 'type' => '@type', + 'visibility' => 'visibility', + 'matchingContexts' => 'matchingContexts', + 'contributor' => 'contributor', + 'message' => 'message', + 'expires' => 'expires', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + '@context' => 'setContext', + '@id' => 'setId', + '@type' => 'setType', + 'visibility' => 'setVisibility', + 'matchingContexts' => 'setMatchingContexts', + 'contributor' => 'setContributor', + 'message' => 'setMessage', + 'expires' => 'setExpires', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + '@context' => 'getContext', + '@id' => 'getId', + '@type' => 'getType', + 'visibility' => 'getVisibility', + 'matchingContexts' => 'getMatchingContexts', + 'contributor' => 'getContributor', + 'message' => 'getMessage', + 'expires' => 'getExpires', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['context'] = $data[self::$attributeMap['context']] ?? null; + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['type'] = $data[self::$attributeMap['type']] ?? null; + $this->container['visibility'] = $data[self::$attributeMap['visibility']] ?? 'private'; + $this->container['matchingContexts'] = $data[self::$attributeMap['matchingContexts']] ?? null; + $this->container['contributor'] = $data[self::$attributeMap['contributor']] ?? null; + $this->container['message'] = $data[self::$attributeMap['message']] ?? null; + $this->container['expires'] = $data[self::$attributeMap['expires']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets visibility. + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility. + * + * @param string|null $visibility The visibility of the Notice. See `NoticeVisibility` for an enumeration of the allowed values: - \"public\": anyone may view this Notice - \"private\": Notice is only visible to Contributor - \"archived\": A deleted notice because it wasn't relevant anymore - \"draft\": Notice is only visible to Contributor, pending publication - \"question\": A question asked by a someone on a webpage. A question is not publicly visible. + * + * @return self + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + + return $this; + } + + /** + * Gets matchingContexts. + * + * @return \DisMoi\Client\Model\MatchingContextJsonldCreate[]|null + */ + public function getMatchingContexts() + { + return $this->container['matchingContexts']; + } + + /** + * Sets matchingContexts. + * + * @param \DisMoi\Client\Model\MatchingContextJsonldCreate[]|null $matchingContexts matchingContexts + * + * @return self + */ + public function setMatchingContexts($matchingContexts) + { + $this->container['matchingContexts'] = $matchingContexts; + + return $this; + } + + /** + * Gets contributor. + * + * @return string|null + */ + public function getContributor() + { + return $this->container['contributor']; + } + + /** + * Sets contributor. + * + * @param string|null $contributor the Contributor who submitted the Notice + * + * @return self + */ + public function setContributor($contributor) + { + $this->container['contributor'] = $contributor; + + return $this; + } + + /** + * Gets message. + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message. + * + * @param string|null $message The raw message attached to the Notice, as given by the Contributor. It is unsafe to read from it, prefer reading from `strippedMessage`. + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets expires. + * + * @return \DateTime|null + */ + public function getExpires() + { + return $this->container['expires']; + } + + /** + * Sets expires. + * + * @param \DateTime|null $expires expiration date of the notice, in the ISO8601 format + * + * @return self + */ + public function setExpires($expires) + { + $this->container['expires'] = $expires; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/NoticeJsonldRead.php b/src/Model/NoticeJsonldRead.php new file mode 100644 index 0000000..2656507 --- /dev/null +++ b/src/Model/NoticeJsonldRead.php @@ -0,0 +1,811 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NoticeJsonldRead implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Notice.jsonld-read'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'visibility' => 'string', + 'matchingContexts' => '\DisMoi\Client\Model\MatchingContextJsonldRead[]', + 'contributor' => 'string', + 'message' => 'string', + 'badgedCount' => 'int', + 'displayedCount' => 'int', + 'unfoldedCount' => 'int', + 'clickedCount' => 'int', + 'likedCount' => 'int', + 'dislikedCount' => 'int', + 'dismissedCount' => 'int', + 'created' => '\DateTime', + 'expires' => '\DateTime', + 'modified' => '\DateTime', + 'strippedMessage' => 'string', + 'likes' => 'int', + 'dislikes' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '@context' => null, '@id' => null, '@type' => null, 'id' => null, 'visibility' => null, 'matchingContexts' => null, 'contributor' => 'iri-reference', 'message' => null, 'badgedCount' => null, 'displayedCount' => null, 'unfoldedCount' => null, 'clickedCount' => null, 'likedCount' => null, 'dislikedCount' => null, 'dismissedCount' => null, 'created' => 'date-time', 'expires' => 'date-time', 'modified' => 'date-time', 'strippedMessage' => null, 'likes' => null, 'dislikes' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'context' => '@context', + 'id' => '@id', + 'type' => '@type', + 'id' => 'id', + 'visibility' => 'visibility', + 'matchingContexts' => 'matchingContexts', + 'contributor' => 'contributor', + 'message' => 'message', + 'badgedCount' => 'badgedCount', + 'displayedCount' => 'displayedCount', + 'unfoldedCount' => 'unfoldedCount', + 'clickedCount' => 'clickedCount', + 'likedCount' => 'likedCount', + 'dislikedCount' => 'dislikedCount', + 'dismissedCount' => 'dismissedCount', + 'created' => 'created', + 'expires' => 'expires', + 'modified' => 'modified', + 'strippedMessage' => 'strippedMessage', + 'likes' => 'likes', + 'dislikes' => 'dislikes', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + '@context' => 'setContext', + '@id' => 'setId', + '@type' => 'setType', + 'id' => 'setId', + 'visibility' => 'setVisibility', + 'matchingContexts' => 'setMatchingContexts', + 'contributor' => 'setContributor', + 'message' => 'setMessage', + 'badgedCount' => 'setBadgedCount', + 'displayedCount' => 'setDisplayedCount', + 'unfoldedCount' => 'setUnfoldedCount', + 'clickedCount' => 'setClickedCount', + 'likedCount' => 'setLikedCount', + 'dislikedCount' => 'setDislikedCount', + 'dismissedCount' => 'setDismissedCount', + 'created' => 'setCreated', + 'expires' => 'setExpires', + 'modified' => 'setModified', + 'strippedMessage' => 'setStrippedMessage', + 'likes' => 'setLikes', + 'dislikes' => 'setDislikes', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + '@context' => 'getContext', + '@id' => 'getId', + '@type' => 'getType', + 'id' => 'getId', + 'visibility' => 'getVisibility', + 'matchingContexts' => 'getMatchingContexts', + 'contributor' => 'getContributor', + 'message' => 'getMessage', + 'badgedCount' => 'getBadgedCount', + 'displayedCount' => 'getDisplayedCount', + 'unfoldedCount' => 'getUnfoldedCount', + 'clickedCount' => 'getClickedCount', + 'likedCount' => 'getLikedCount', + 'dislikedCount' => 'getDislikedCount', + 'dismissedCount' => 'getDismissedCount', + 'created' => 'getCreated', + 'expires' => 'getExpires', + 'modified' => 'getModified', + 'strippedMessage' => 'getStrippedMessage', + 'likes' => 'getLikes', + 'dislikes' => 'getDislikes', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['context'] = $data[self::$attributeMap['context']] ?? null; + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['type'] = $data[self::$attributeMap['type']] ?? null; + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['visibility'] = $data[self::$attributeMap['visibility']] ?? 'private'; + $this->container['matchingContexts'] = $data[self::$attributeMap['matchingContexts']] ?? null; + $this->container['contributor'] = $data[self::$attributeMap['contributor']] ?? null; + $this->container['message'] = $data[self::$attributeMap['message']] ?? null; + $this->container['badgedCount'] = $data[self::$attributeMap['badgedCount']] ?? null; + $this->container['displayedCount'] = $data[self::$attributeMap['displayedCount']] ?? null; + $this->container['unfoldedCount'] = $data[self::$attributeMap['unfoldedCount']] ?? null; + $this->container['clickedCount'] = $data[self::$attributeMap['clickedCount']] ?? null; + $this->container['likedCount'] = $data[self::$attributeMap['likedCount']] ?? null; + $this->container['dislikedCount'] = $data[self::$attributeMap['dislikedCount']] ?? null; + $this->container['dismissedCount'] = $data[self::$attributeMap['dismissedCount']] ?? null; + $this->container['created'] = $data[self::$attributeMap['created']] ?? null; + $this->container['expires'] = $data[self::$attributeMap['expires']] ?? null; + $this->container['modified'] = $data[self::$attributeMap['modified']] ?? null; + $this->container['strippedMessage'] = $data[self::$attributeMap['strippedMessage']] ?? null; + $this->container['likes'] = $data[self::$attributeMap['likes']] ?? null; + $this->container['dislikes'] = $data[self::$attributeMap['dislikes']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets id. + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id. + * + * @param int|null $id a unique, incremental, numerical identifier for the Notice + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets visibility. + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility. + * + * @param string|null $visibility The visibility of the Notice. See `NoticeVisibility` for an enumeration of the allowed values: - \"public\": anyone may view this Notice - \"private\": Notice is only visible to Contributor - \"archived\": A deleted notice because it wasn't relevant anymore - \"draft\": Notice is only visible to Contributor, pending publication - \"question\": A question asked by a someone on a webpage. A question is not publicly visible. + * + * @return self + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + + return $this; + } + + /** + * Gets matchingContexts. + * + * @return \DisMoi\Client\Model\MatchingContextJsonldRead[]|null + */ + public function getMatchingContexts() + { + return $this->container['matchingContexts']; + } + + /** + * Sets matchingContexts. + * + * @param \DisMoi\Client\Model\MatchingContextJsonldRead[]|null $matchingContexts matchingContexts + * + * @return self + */ + public function setMatchingContexts($matchingContexts) + { + $this->container['matchingContexts'] = $matchingContexts; + + return $this; + } + + /** + * Gets contributor. + * + * @return string|null + */ + public function getContributor() + { + return $this->container['contributor']; + } + + /** + * Sets contributor. + * + * @param string|null $contributor the Contributor who submitted the Notice + * + * @return self + */ + public function setContributor($contributor) + { + $this->container['contributor'] = $contributor; + + return $this; + } + + /** + * Gets message. + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message. + * + * @param string|null $message The raw message attached to the Notice, as given by the Contributor. It is unsafe to read from it, prefer reading from `strippedMessage`. + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets badgedCount. + * + * @return int|null + */ + public function getBadgedCount() + { + return $this->container['badgedCount']; + } + + /** + * Sets badgedCount. + * + * @param int|null $badgedCount badgedCount + * + * @return self + */ + public function setBadgedCount($badgedCount) + { + $this->container['badgedCount'] = $badgedCount; + + return $this; + } + + /** + * Gets displayedCount. + * + * @return int|null + */ + public function getDisplayedCount() + { + return $this->container['displayedCount']; + } + + /** + * Sets displayedCount. + * + * @param int|null $displayedCount the number of time the notice has been displayed in a list + * + * @return self + */ + public function setDisplayedCount($displayedCount) + { + $this->container['displayedCount'] = $displayedCount; + + return $this; + } + + /** + * Gets unfoldedCount. + * + * @return int|null + */ + public function getUnfoldedCount() + { + return $this->container['unfoldedCount']; + } + + /** + * Sets unfoldedCount. + * + * @param int|null $unfoldedCount the number of time the notice has been displayed in full + * + * @return self + */ + public function setUnfoldedCount($unfoldedCount) + { + $this->container['unfoldedCount'] = $unfoldedCount; + + return $this; + } + + /** + * Gets clickedCount. + * + * @return int|null + */ + public function getClickedCount() + { + return $this->container['clickedCount']; + } + + /** + * Sets clickedCount. + * + * @param int|null $clickedCount the number of time the notice has been clicked + * + * @return self + */ + public function setClickedCount($clickedCount) + { + $this->container['clickedCount'] = $clickedCount; + + return $this; + } + + /** + * Gets likedCount. + * + * @return int|null + */ + public function getLikedCount() + { + return $this->container['likedCount']; + } + + /** + * Sets likedCount. + * + * @param int|null $likedCount the number of time the notice has been liked + * + * @return self + */ + public function setLikedCount($likedCount) + { + $this->container['likedCount'] = $likedCount; + + return $this; + } + + /** + * Gets dislikedCount. + * + * @return int|null + */ + public function getDislikedCount() + { + return $this->container['dislikedCount']; + } + + /** + * Sets dislikedCount. + * + * @param int|null $dislikedCount the number of time the notice has been disliked + * + * @return self + */ + public function setDislikedCount($dislikedCount) + { + $this->container['dislikedCount'] = $dislikedCount; + + return $this; + } + + /** + * Gets dismissedCount. + * + * @return int|null + */ + public function getDismissedCount() + { + return $this->container['dismissedCount']; + } + + /** + * Sets dismissedCount. + * + * @param int|null $dismissedCount the number of time the notice has been dismissed + * + * @return self + */ + public function setDismissedCount($dismissedCount) + { + $this->container['dismissedCount'] = $dismissedCount; + + return $this; + } + + /** + * Gets created. + * + * @return \DateTime|null + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created. + * + * @param \DateTime|null $created creation date of the notice, serialized in the ISO8601 format + * + * @return self + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets expires. + * + * @return \DateTime|null + */ + public function getExpires() + { + return $this->container['expires']; + } + + /** + * Sets expires. + * + * @param \DateTime|null $expires expiration date of the notice, in the ISO8601 format + * + * @return self + */ + public function setExpires($expires) + { + $this->container['expires'] = $expires; + + return $this; + } + + /** + * Gets modified. + * + * @return \DateTime|null + */ + public function getModified() + { + return $this->container['modified']; + } + + /** + * Sets modified. + * + * @param \DateTime|null $modified last modification date of the notice, serialized in the ISO8601 format + * + * @return self + */ + public function setModified($modified) + { + $this->container['modified'] = $modified; + + return $this; + } + + /** + * Gets strippedMessage. + * + * @return string|null + */ + public function getStrippedMessage() + { + return $this->container['strippedMessage']; + } + + /** + * Sets strippedMessage. + * + * @param string|null $strippedMessage The message attached to the Notice, ie. what the user wants to read, the main content of DisMoi, the added value, etc. It is HTML, and is \"purified\", ie. is stripped of HTML tags not in ALLOWED_TAGS. + * + * @return self + */ + public function setStrippedMessage($strippedMessage) + { + $this->container['strippedMessage'] = $strippedMessage; + + return $this; + } + + /** + * Gets likes. + * + * @return int|null + */ + public function getLikes() + { + return $this->container['likes']; + } + + /** + * Sets likes. + * + * @param int|null $likes amount of likes the Notice has received + * + * @return self + */ + public function setLikes($likes) + { + $this->container['likes'] = $likes; + + return $this; + } + + /** + * Gets dislikes. + * + * @return int|null + */ + public function getDislikes() + { + return $this->container['dislikes']; + } + + /** + * Sets dislikes. + * + * @param int|null $dislikes amount of dislikes the Notice has received + * + * @return self + */ + public function setDislikes($dislikes) + { + $this->container['dislikes'] = $dislikes; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/NoticeRead.php b/src/Model/NoticeRead.php new file mode 100644 index 0000000..b020c67 --- /dev/null +++ b/src/Model/NoticeRead.php @@ -0,0 +1,799 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class NoticeRead implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Notice-read'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'id' => 'int', + 'visibility' => 'string', + 'matchingContexts' => '\DisMoi\Client\Model\MatchingContextRead[]', + 'contributor' => 'string', + 'message' => 'string', + 'badgedCount' => 'int', + 'displayedCount' => 'int', + 'unfoldedCount' => 'int', + 'clickedCount' => 'int', + 'likedCount' => 'int', + 'dislikedCount' => 'int', + 'dismissedCount' => 'int', + 'created' => '\DateTime', + 'expires' => '\DateTime', + 'modified' => '\DateTime', + 'strippedMessage' => 'string', + 'likes' => 'int', + 'dislikes' => 'int', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'id' => null, 'visibility' => null, 'matchingContexts' => null, 'contributor' => 'iri-reference', 'message' => null, 'badgedCount' => null, 'displayedCount' => null, 'unfoldedCount' => null, 'clickedCount' => null, 'likedCount' => null, 'dislikedCount' => null, 'dismissedCount' => null, 'created' => 'date-time', 'expires' => 'date-time', 'modified' => 'date-time', 'strippedMessage' => null, 'likes' => null, 'dislikes' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'visibility' => 'visibility', + 'matchingContexts' => 'matchingContexts', + 'contributor' => 'contributor', + 'message' => 'message', + 'badgedCount' => 'badgedCount', + 'displayedCount' => 'displayedCount', + 'unfoldedCount' => 'unfoldedCount', + 'clickedCount' => 'clickedCount', + 'likedCount' => 'likedCount', + 'dislikedCount' => 'dislikedCount', + 'dismissedCount' => 'dismissedCount', + 'created' => 'created', + 'expires' => 'expires', + 'modified' => 'modified', + 'strippedMessage' => 'strippedMessage', + 'likes' => 'likes', + 'dislikes' => 'dislikes', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'visibility' => 'setVisibility', + 'matchingContexts' => 'setMatchingContexts', + 'contributor' => 'setContributor', + 'message' => 'setMessage', + 'badgedCount' => 'setBadgedCount', + 'displayedCount' => 'setDisplayedCount', + 'unfoldedCount' => 'setUnfoldedCount', + 'clickedCount' => 'setClickedCount', + 'likedCount' => 'setLikedCount', + 'dislikedCount' => 'setDislikedCount', + 'dismissedCount' => 'setDismissedCount', + 'created' => 'setCreated', + 'expires' => 'setExpires', + 'modified' => 'setModified', + 'strippedMessage' => 'setStrippedMessage', + 'likes' => 'setLikes', + 'dislikes' => 'setDislikes', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'visibility' => 'getVisibility', + 'matchingContexts' => 'getMatchingContexts', + 'contributor' => 'getContributor', + 'message' => 'getMessage', + 'badgedCount' => 'getBadgedCount', + 'displayedCount' => 'getDisplayedCount', + 'unfoldedCount' => 'getUnfoldedCount', + 'clickedCount' => 'getClickedCount', + 'likedCount' => 'getLikedCount', + 'dislikedCount' => 'getDislikedCount', + 'dismissedCount' => 'getDismissedCount', + 'created' => 'getCreated', + 'expires' => 'getExpires', + 'modified' => 'getModified', + 'strippedMessage' => 'getStrippedMessage', + 'likes' => 'getLikes', + 'dislikes' => 'getDislikes', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = $data[self::$attributeMap['id']] ?? null; + $this->container['visibility'] = $data[self::$attributeMap['visibility']] ?? 'private'; + $this->container['matchingContexts'] = $data[self::$attributeMap['matchingContexts']] ?? null; + $this->container['contributor'] = $data[self::$attributeMap['contributor']] ?? null; + $this->container['message'] = $data[self::$attributeMap['message']] ?? null; + $this->container['badgedCount'] = $data[self::$attributeMap['badgedCount']] ?? null; + $this->container['displayedCount'] = $data[self::$attributeMap['displayedCount']] ?? null; + $this->container['unfoldedCount'] = $data[self::$attributeMap['unfoldedCount']] ?? null; + $this->container['clickedCount'] = $data[self::$attributeMap['clickedCount']] ?? null; + $this->container['likedCount'] = $data[self::$attributeMap['likedCount']] ?? null; + $this->container['dislikedCount'] = $data[self::$attributeMap['dislikedCount']] ?? null; + $this->container['dismissedCount'] = $data[self::$attributeMap['dismissedCount']] ?? null; + $this->container['created'] = $data[self::$attributeMap['created']] ?? null; + $this->container['expires'] = $data[self::$attributeMap['expires']] ?? null; + $this->container['modified'] = $data[self::$attributeMap['modified']] ?? null; + $this->container['strippedMessage'] = $data[self::$attributeMap['strippedMessage']] ?? null; + $this->container['likes'] = $data[self::$attributeMap['likes']] ?? null; + $this->container['dislikes'] = $data[self::$attributeMap['dislikes']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets id. + * + * @return int|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id. + * + * @param int|null $id a unique, incremental, numerical identifier for the Notice + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets visibility. + * + * @return string|null + */ + public function getVisibility() + { + return $this->container['visibility']; + } + + /** + * Sets visibility. + * + * @param string|null $visibility The visibility of the Notice. See `NoticeVisibility` for an enumeration of the allowed values: - \"public\": anyone may view this Notice - \"private\": Notice is only visible to Contributor - \"archived\": A deleted notice because it wasn't relevant anymore - \"draft\": Notice is only visible to Contributor, pending publication - \"question\": A question asked by a someone on a webpage. A question is not publicly visible. + * + * @return self + */ + public function setVisibility($visibility) + { + $this->container['visibility'] = $visibility; + + return $this; + } + + /** + * Gets matchingContexts. + * + * @return \DisMoi\Client\Model\MatchingContextRead[]|null + */ + public function getMatchingContexts() + { + return $this->container['matchingContexts']; + } + + /** + * Sets matchingContexts. + * + * @param \DisMoi\Client\Model\MatchingContextRead[]|null $matchingContexts matchingContexts + * + * @return self + */ + public function setMatchingContexts($matchingContexts) + { + $this->container['matchingContexts'] = $matchingContexts; + + return $this; + } + + /** + * Gets contributor. + * + * @return string|null + */ + public function getContributor() + { + return $this->container['contributor']; + } + + /** + * Sets contributor. + * + * @param string|null $contributor the Contributor who submitted the Notice + * + * @return self + */ + public function setContributor($contributor) + { + $this->container['contributor'] = $contributor; + + return $this; + } + + /** + * Gets message. + * + * @return string|null + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message. + * + * @param string|null $message The raw message attached to the Notice, as given by the Contributor. It is unsafe to read from it, prefer reading from `strippedMessage`. + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets badgedCount. + * + * @return int|null + */ + public function getBadgedCount() + { + return $this->container['badgedCount']; + } + + /** + * Sets badgedCount. + * + * @param int|null $badgedCount badgedCount + * + * @return self + */ + public function setBadgedCount($badgedCount) + { + $this->container['badgedCount'] = $badgedCount; + + return $this; + } + + /** + * Gets displayedCount. + * + * @return int|null + */ + public function getDisplayedCount() + { + return $this->container['displayedCount']; + } + + /** + * Sets displayedCount. + * + * @param int|null $displayedCount the number of time the notice has been displayed in a list + * + * @return self + */ + public function setDisplayedCount($displayedCount) + { + $this->container['displayedCount'] = $displayedCount; + + return $this; + } + + /** + * Gets unfoldedCount. + * + * @return int|null + */ + public function getUnfoldedCount() + { + return $this->container['unfoldedCount']; + } + + /** + * Sets unfoldedCount. + * + * @param int|null $unfoldedCount the number of time the notice has been displayed in full + * + * @return self + */ + public function setUnfoldedCount($unfoldedCount) + { + $this->container['unfoldedCount'] = $unfoldedCount; + + return $this; + } + + /** + * Gets clickedCount. + * + * @return int|null + */ + public function getClickedCount() + { + return $this->container['clickedCount']; + } + + /** + * Sets clickedCount. + * + * @param int|null $clickedCount the number of time the notice has been clicked + * + * @return self + */ + public function setClickedCount($clickedCount) + { + $this->container['clickedCount'] = $clickedCount; + + return $this; + } + + /** + * Gets likedCount. + * + * @return int|null + */ + public function getLikedCount() + { + return $this->container['likedCount']; + } + + /** + * Sets likedCount. + * + * @param int|null $likedCount the number of time the notice has been liked + * + * @return self + */ + public function setLikedCount($likedCount) + { + $this->container['likedCount'] = $likedCount; + + return $this; + } + + /** + * Gets dislikedCount. + * + * @return int|null + */ + public function getDislikedCount() + { + return $this->container['dislikedCount']; + } + + /** + * Sets dislikedCount. + * + * @param int|null $dislikedCount the number of time the notice has been disliked + * + * @return self + */ + public function setDislikedCount($dislikedCount) + { + $this->container['dislikedCount'] = $dislikedCount; + + return $this; + } + + /** + * Gets dismissedCount. + * + * @return int|null + */ + public function getDismissedCount() + { + return $this->container['dismissedCount']; + } + + /** + * Sets dismissedCount. + * + * @param int|null $dismissedCount the number of time the notice has been dismissed + * + * @return self + */ + public function setDismissedCount($dismissedCount) + { + $this->container['dismissedCount'] = $dismissedCount; + + return $this; + } + + /** + * Gets created. + * + * @return \DateTime|null + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created. + * + * @param \DateTime|null $created creation date of the notice, serialized in the ISO8601 format + * + * @return self + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets expires. + * + * @return \DateTime|null + */ + public function getExpires() + { + return $this->container['expires']; + } + + /** + * Sets expires. + * + * @param \DateTime|null $expires expiration date of the notice, in the ISO8601 format + * + * @return self + */ + public function setExpires($expires) + { + $this->container['expires'] = $expires; + + return $this; + } + + /** + * Gets modified. + * + * @return \DateTime|null + */ + public function getModified() + { + return $this->container['modified']; + } + + /** + * Sets modified. + * + * @param \DateTime|null $modified last modification date of the notice, serialized in the ISO8601 format + * + * @return self + */ + public function setModified($modified) + { + $this->container['modified'] = $modified; + + return $this; + } + + /** + * Gets strippedMessage. + * + * @return string|null + */ + public function getStrippedMessage() + { + return $this->container['strippedMessage']; + } + + /** + * Sets strippedMessage. + * + * @param string|null $strippedMessage The message attached to the Notice, ie. what the user wants to read, the main content of DisMoi, the added value, etc. It is HTML, and is \"purified\", ie. is stripped of HTML tags not in ALLOWED_TAGS. + * + * @return self + */ + public function setStrippedMessage($strippedMessage) + { + $this->container['strippedMessage'] = $strippedMessage; + + return $this; + } + + /** + * Gets likes. + * + * @return int|null + */ + public function getLikes() + { + return $this->container['likes']; + } + + /** + * Sets likes. + * + * @param int|null $likes amount of likes the Notice has received + * + * @return self + */ + public function setLikes($likes) + { + $this->container['likes'] = $likes; + + return $this; + } + + /** + * Gets dislikes. + * + * @return int|null + */ + public function getDislikes() + { + return $this->container['dislikes']; + } + + /** + * Sets dislikes. + * + * @param int|null $dislikes amount of dislikes the Notice has received + * + * @return self + */ + public function setDislikes($dislikes) + { + $this->container['dislikes'] = $dislikes; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/Model/Token.php b/src/Model/Token.php new file mode 100644 index 0000000..1e10c04 --- /dev/null +++ b/src/Model/Token.php @@ -0,0 +1,305 @@ + + * @template TKey int|null + * @template TValue mixed|null + */ +class Token implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'Token'; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @var string[] + */ + protected static $openAPITypes = [ + 'token' => 'string', + ]; + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'token' => null, + ]; + + /** + * Array of property to type mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization. + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @var string[] + */ + protected static $attributeMap = [ + 'token' => 'token', + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @var string[] + */ + protected static $setters = [ + 'token' => 'setToken', + ]; + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @var string[] + */ + protected static $getters = [ + 'token' => 'getToken', + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name. + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses). + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests). + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + /** + * Associative array for storing property values. + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor. + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['token'] = $data[self::$attributeMap['token']] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + return []; + } + + /** + * Validate all the properties in the model + * return true if all passed. + * + * @return bool True if all properties are valid + */ + public function valid() + { + return 0 === \count($this->listInvalidProperties()); + } + + /** + * Gets token. + * + * @return string|null + */ + public function getToken() + { + return $this->container['token']; + } + + /** + * Sets token. + * + * @param string|null $token token + * + * @return self + */ + public function setToken($token) + { + $this->container['token'] = $token; + + return $this; + } + + /** + * Returns true if offset exists. False otherwise. + * + * @param int $offset Offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int $offset Offset + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (null === $offset) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource + */ + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object. + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + \JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object. + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php new file mode 100644 index 0000000..1635d3e --- /dev/null +++ b/src/ObjectSerializer.php @@ -0,0 +1,383 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if (\is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + + return $data; + } + + if (\is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->{$getter}(); + if (null !== $value && ! \in_array($openAPIType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + $callable = [$openAPIType, 'getAllowableEnumValues']; + if (\is_callable($callable)) { + /** array $callable */ + $allowedEnumTypes = $callable(); + if ( ! \in_array($value, $allowedEnumTypes, true)) { + $imploded = implode("', '", $allowedEnumTypes); + throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'"); + } + } + } + if (null !== $value) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach ($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + + return (object) $values; + } + + return (string) $data; + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif. + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename($filename) + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } + + return $filename; + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the path, by url-encoding. + * + * @param string $value a string which will be part of the path + * + * @return string the serialized object + */ + public static function toPathValue($value) + { + return rawurlencode(self::toString($value)); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the query, by imploding comma-separated if it's an object. + * If it's a string, pass through unchanged. It will be url-encoded + * later. + * + * @param string[]|string|\DateTime $object an object to be serialized to a string + * + * @return string the serialized object + */ + public static function toQueryValue($object) + { + if (\is_array($object)) { + return implode(',', $object); + } + + return self::toString($object); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the header. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601. + * + * @param string $value a string which will be part of the header + * + * @return string the header string + */ + public static function toHeaderValue($value) + { + $callable = [$value, 'toHeaderValue']; + if (\is_callable($callable)) { + return $callable(); + } + + return self::toString($value); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the http body (form parameter). If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601. + * + * @param string|\SplFileObject $value the value of the form parameter + * + * @return string the form string + */ + public static function toFormValue($value) + { + if ($value instanceof \SplFileObject) { + return $value->getRealPath(); + } + + return self::toString($value); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the parameter. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * If it's a boolean, convert it to "true" or "false". + * + * @param string|bool|\DateTime $value the value of the parameter + * + * @return string the header string + */ + public static function toString($value) + { + if ($value instanceof \DateTime) { // datetime in ISO8601 format + return $value->format(self::$dateTimeFormat); + } + if (\is_bool($value)) { + return $value ? 'true' : 'false'; + } + + return $value; + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + switch ($style) { + case 'pipeDelimited': + case 'pipes': + return implode('|', $collection); + case 'tsv': + return implode("\t", $collection); + case 'spaceDelimited': + case 'ssv': + return implode(' ', $collection); + case 'simple': + case 'csv': + // Deliberate fall through. CSV is default format. + default: + return implode(',', $collection); + } + } + + /** + * Deserialize a JSON string into an object. + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[] $httpHeaders HTTP headers + * + * @return object|array|null a single or an array of $class instances + */ + public static function deserialize($data, $class, $httpHeaders = null) + { + if (null === $data) { + return null; + } + + if (0 === strcasecmp(substr($class, -2), '[]')) { + $data = \is_string($data) ? json_decode($data) : $data; + +// if ( +// (isset($data->{'@type'})) +// && +// ('hydra:Collection' === $data->{'@type'}) +// && +// (isset($data->{'hydra:member'})) +// ) { +// $data = $data->{'hydra:member'}; +// } + + if ( ! \is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = \is_string($data) ? json_decode($data) : $data; + $data = (array) $data; + $inner = substr($class, 4, -1); + $deserialized = []; + if (false !== strrpos($inner, ',')) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + + return $deserialized; + } + + if ('object' === $class) { + return (array) $data; + } + + if ('\DateTime' === $class) { + // Some API's return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if ( ! empty($data)) { + try { + return new \DateTime($data); + } catch (\Exception $exception) { + // Some API's return a date-time with too high nanosecond + // precision for php's DateTime to handle. This conversion + // (string -> unix timestamp -> DateTime) is a workaround + // for the problem. + return (new \DateTime())->setTimestamp(strtotime($data)); + } + } else { + return null; + } + } + + // @psalm-suppress ParadoxicalCondition + if (\in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + settype($data, $class); + + return $data; + } + + if ('\SplFileObject' === $class) { + // @var \Psr\Http\Message\StreamInterface $data + + // determine file name + if (\array_key_exists('Content-Disposition', $httpHeaders) && + preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath().\DIRECTORY_SEPARATOR.self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + if (method_exists($class, 'getAllowableEnumValues')) { + if ( ! \in_array($data, $class::getAllowableEnumValues(), true)) { + $imploded = implode("', '", $class::getAllowableEnumValues()); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + + return $data; + } + $data = \is_string($data) ? json_decode($data) : $data; + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if ( ! empty($discriminator) && isset($data->{$discriminator}) && \is_string($data->{$discriminator})) { + $subclass = '\DisMoi\Client\Model\\'.$data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if ( ! isset($propertySetter) || ! isset($data->{$instance::attributeMap()[$property]})) { + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->{$propertySetter}(self::deserialize($propertyValue, $type, null)); + } + } + + return $instance; + } +} diff --git a/test/Api/AuthenticationApiTest.php b/test/Api/AuthenticationApiTest.php new file mode 100644 index 0000000..a62db68 --- /dev/null +++ b/test/Api/AuthenticationApiTest.php @@ -0,0 +1,70 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/ContributorApiTest.php b/test/Api/ContributorApiTest.php new file mode 100644 index 0000000..da4d3c6 --- /dev/null +++ b/test/Api/ContributorApiTest.php @@ -0,0 +1,70 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/MatchingContextApiTest.php b/test/Api/MatchingContextApiTest.php new file mode 100644 index 0000000..7bef6f5 --- /dev/null +++ b/test/Api/MatchingContextApiTest.php @@ -0,0 +1,103 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test case for getMatchingContextCollection. + * + * Retrieves the collection of MatchingContext resources.. + */ + public function testGetMatchingContextCollection(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for getMatchingContextItem. + * + * Retrieves a MatchingContext resource.. + */ + public function testGetMatchingContextItem(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for postMatchingContextCollection. + * + * Creates a MatchingContext resource.. + */ + public function testPostMatchingContextCollection(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Api/NoticeApiTest.php b/test/Api/NoticeApiTest.php new file mode 100644 index 0000000..1ff8a8e --- /dev/null +++ b/test/Api/NoticeApiTest.php @@ -0,0 +1,114 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test case for deleteNoticeItem. + * + * Removes the Notice resource.. + */ + public function testDeleteNoticeItem(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for getNoticeCollection. + * + * Retrieves the collection of Notice resources.. + */ + public function testGetNoticeCollection(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for getNoticeItem. + * + * Retrieves a Notice resource.. + */ + public function testGetNoticeItem(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test case for postNoticeCollection. + * + * Creates a Notice resource.. + */ + public function testPostNoticeCollection(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/DevServerTest.php b/test/DevServerTest.php new file mode 100644 index 0000000..b14d39c --- /dev/null +++ b/test/DevServerTest.php @@ -0,0 +1,123 @@ +configuration = Configuration::getDefaultConfiguration()->setHost('http://localhost:8088'); + $this->client = new Client(); + $authenticationApi = new AuthenticationApi( + $this->client, + $this->configuration + ); + $credentials = new Credentials([ + 'username' => 'lmem', + 'password' => 'LM3M!P4SSW0RD', + ]); + ['token' => $token] = $authenticationApi->postCredentialsItem($credentials); + echo $token, \PHP_EOL; + + $this->configuration->setApiKey('Authorization', $token); + } catch (\Exception $e) { + echo \PHP_EOL; + echo $e->getMessage(), \PHP_EOL; + echo $e->getTraceAsString(); + } + } + + /** + * @group dev + */ + public function testPostJsonLdNotice(): void + { + try { + $noticeApi = new NoticeApi($this->client, $this->configuration); + $noticeCreationPayload = new NoticeJsonldCreate([ + 'message' => 'Bonjour', + 'contributor' => '/v4/contributors/1', + 'visibility' => 'public', + 'matchingContexts' => [ + new MatchingContextJsonldCreate([ + 'exampleUrl' => 'http://tests.menant-benjamin.fr/', + 'urlRegex' => '(.*)', + 'excludeUrlRegex' => '', + 'description' => 'a regexp', + 'querySelector' => '', + 'xpath' => '', + ]), + ], + ]); + $response = $noticeApi->postNoticeCollection($noticeCreationPayload); + var_dump($response); + } catch (RequestException $e) { + $response = $e->getResponse(); + $responseBodyAsString = $response->getBody()->getContents(); + var_dump(json_decode($responseBodyAsString, true)['hydra:description']); + } catch (\Exception $e) { + echo \PHP_EOL; + echo $e->getMessage(), \PHP_EOL; + echo $e->getTraceAsString(); + } + } + + /** + * Clean up after running each test case. + */ + protected function tearDown(): void + { + } + + /** + * Clean up after running all test cases. + */ + public static function tearDownAfterClass(): void + { + } +} diff --git a/test/Model/ContributorJsonldReadTest.php b/test/Model/ContributorJsonldReadTest.php new file mode 100644 index 0000000..8f39cfe --- /dev/null +++ b/test/Model/ContributorJsonldReadTest.php @@ -0,0 +1,69 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/CredentialsTest.php b/test/Model/CredentialsTest.php new file mode 100644 index 0000000..b479934 --- /dev/null +++ b/test/Model/CredentialsTest.php @@ -0,0 +1,87 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "username". + */ + public function testPropertyUsername(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "password". + */ + public function testPropertyPassword(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/InlineResponse2001Test.php b/test/Model/InlineResponse2001Test.php new file mode 100644 index 0000000..3bf3fa1 --- /dev/null +++ b/test/Model/InlineResponse2001Test.php @@ -0,0 +1,105 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:member". + */ + public function testPropertyMember(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:totalItems". + */ + public function testPropertyTotalItems(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:view". + */ + public function testPropertyView(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:search". + */ + public function testPropertySearch(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/InlineResponse200HydraSearchHydraMappingTest.php b/test/Model/InlineResponse200HydraSearchHydraMappingTest.php new file mode 100644 index 0000000..184bd64 --- /dev/null +++ b/test/Model/InlineResponse200HydraSearchHydraMappingTest.php @@ -0,0 +1,96 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "variable". + */ + public function testPropertyVariable(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "property". + */ + public function testPropertyProperty(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "required". + */ + public function testPropertyRequired(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/InlineResponse200HydraSearchTest.php b/test/Model/InlineResponse200HydraSearchTest.php new file mode 100644 index 0000000..a43f595 --- /dev/null +++ b/test/Model/InlineResponse200HydraSearchTest.php @@ -0,0 +1,96 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:template". + */ + public function testPropertyTemplate(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:variableRepresentation". + */ + public function testPropertyVariableRepresentation(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:mapping". + */ + public function testPropertyMapping(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/InlineResponse200HydraViewTest.php b/test/Model/InlineResponse200HydraViewTest.php new file mode 100644 index 0000000..284d8d6 --- /dev/null +++ b/test/Model/InlineResponse200HydraViewTest.php @@ -0,0 +1,105 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:first". + */ + public function testPropertyFirst(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:last". + */ + public function testPropertyLast(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:previous". + */ + public function testPropertyPrevious(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:next". + */ + public function testPropertyNext(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/InlineResponse200Test.php b/test/Model/InlineResponse200Test.php new file mode 100644 index 0000000..63c4839 --- /dev/null +++ b/test/Model/InlineResponse200Test.php @@ -0,0 +1,105 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:member". + */ + public function testPropertyMember(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:totalItems". + */ + public function testPropertyTotalItems(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:view". + */ + public function testPropertyView(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "hydra:search". + */ + public function testPropertySearch(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/MatchingContextCreateTest.php b/test/Model/MatchingContextCreateTest.php new file mode 100644 index 0000000..7b5384e --- /dev/null +++ b/test/Model/MatchingContextCreateTest.php @@ -0,0 +1,141 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id". + */ + public function testPropertyId(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "notice". + */ + public function testPropertyNotice(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "exampleUrl". + */ + public function testPropertyExampleUrl(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "urlRegex". + */ + public function testPropertyUrlRegex(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "excludeUrlRegex". + */ + public function testPropertyExcludeUrlRegex(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "description". + */ + public function testPropertyDescription(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "querySelector". + */ + public function testPropertyQuerySelector(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "xpath". + */ + public function testPropertyXpath(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/MatchingContextJsonldCreateTest.php b/test/Model/MatchingContextJsonldCreateTest.php new file mode 100644 index 0000000..bb3d8a8 --- /dev/null +++ b/test/Model/MatchingContextJsonldCreateTest.php @@ -0,0 +1,141 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id". + */ + public function testPropertyId(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "notice". + */ + public function testPropertyNotice(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "exampleUrl". + */ + public function testPropertyExampleUrl(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "urlRegex". + */ + public function testPropertyUrlRegex(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "excludeUrlRegex". + */ + public function testPropertyExcludeUrlRegex(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "description". + */ + public function testPropertyDescription(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "querySelector". + */ + public function testPropertyQuerySelector(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "xpath". + */ + public function testPropertyXpath(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/MatchingContextJsonldReadTest.php b/test/Model/MatchingContextJsonldReadTest.php new file mode 100644 index 0000000..72009e2 --- /dev/null +++ b/test/Model/MatchingContextJsonldReadTest.php @@ -0,0 +1,123 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "exampleUrl". + */ + public function testPropertyExampleUrl(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "urlRegex". + */ + public function testPropertyUrlRegex(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "excludeUrlRegex". + */ + public function testPropertyExcludeUrlRegex(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "description". + */ + public function testPropertyDescription(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "querySelector". + */ + public function testPropertyQuerySelector(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "xpath". + */ + public function testPropertyXpath(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/MatchingContextReadTest.php b/test/Model/MatchingContextReadTest.php new file mode 100644 index 0000000..77e37ea --- /dev/null +++ b/test/Model/MatchingContextReadTest.php @@ -0,0 +1,123 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "exampleUrl". + */ + public function testPropertyExampleUrl(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "urlRegex". + */ + public function testPropertyUrlRegex(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "excludeUrlRegex". + */ + public function testPropertyExcludeUrlRegex(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "description". + */ + public function testPropertyDescription(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "querySelector". + */ + public function testPropertyQuerySelector(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "xpath". + */ + public function testPropertyXpath(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/NoticeCreateTest.php b/test/Model/NoticeCreateTest.php new file mode 100644 index 0000000..4821060 --- /dev/null +++ b/test/Model/NoticeCreateTest.php @@ -0,0 +1,114 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "visibility". + */ + public function testPropertyVisibility(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "matchingContexts". + */ + public function testPropertyMatchingContexts(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "contributor". + */ + public function testPropertyContributor(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "message". + */ + public function testPropertyMessage(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "expires". + */ + public function testPropertyExpires(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/NoticeJsonldCreateTest.php b/test/Model/NoticeJsonldCreateTest.php new file mode 100644 index 0000000..4c61604 --- /dev/null +++ b/test/Model/NoticeJsonldCreateTest.php @@ -0,0 +1,114 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "visibility". + */ + public function testPropertyVisibility(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "matchingContexts". + */ + public function testPropertyMatchingContexts(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "contributor". + */ + public function testPropertyContributor(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "message". + */ + public function testPropertyMessage(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "expires". + */ + public function testPropertyExpires(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/NoticeJsonldReadTest.php b/test/Model/NoticeJsonldReadTest.php new file mode 100644 index 0000000..eb450e1 --- /dev/null +++ b/test/Model/NoticeJsonldReadTest.php @@ -0,0 +1,231 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id". + */ + public function testPropertyId(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "visibility". + */ + public function testPropertyVisibility(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "matchingContexts". + */ + public function testPropertyMatchingContexts(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "contributor". + */ + public function testPropertyContributor(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "message". + */ + public function testPropertyMessage(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "badgedCount". + */ + public function testPropertyBadgedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "displayedCount". + */ + public function testPropertyDisplayedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "unfoldedCount". + */ + public function testPropertyUnfoldedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "clickedCount". + */ + public function testPropertyClickedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "likedCount". + */ + public function testPropertyLikedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "dislikedCount". + */ + public function testPropertyDislikedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "dismissedCount". + */ + public function testPropertyDismissedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "created". + */ + public function testPropertyCreated(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "expires". + */ + public function testPropertyExpires(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "modified". + */ + public function testPropertyModified(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "strippedMessage". + */ + public function testPropertyStrippedMessage(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "likes". + */ + public function testPropertyLikes(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "dislikes". + */ + public function testPropertyDislikes(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/NoticeReadTest.php b/test/Model/NoticeReadTest.php new file mode 100644 index 0000000..611f6ea --- /dev/null +++ b/test/Model/NoticeReadTest.php @@ -0,0 +1,231 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id". + */ + public function testPropertyId(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "visibility". + */ + public function testPropertyVisibility(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "matchingContexts". + */ + public function testPropertyMatchingContexts(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "contributor". + */ + public function testPropertyContributor(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "message". + */ + public function testPropertyMessage(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "badgedCount". + */ + public function testPropertyBadgedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "displayedCount". + */ + public function testPropertyDisplayedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "unfoldedCount". + */ + public function testPropertyUnfoldedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "clickedCount". + */ + public function testPropertyClickedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "likedCount". + */ + public function testPropertyLikedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "dislikedCount". + */ + public function testPropertyDislikedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "dismissedCount". + */ + public function testPropertyDismissedCount(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "created". + */ + public function testPropertyCreated(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "expires". + */ + public function testPropertyExpires(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "modified". + */ + public function testPropertyModified(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "strippedMessage". + */ + public function testPropertyStrippedMessage(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "likes". + */ + public function testPropertyLikes(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "dislikes". + */ + public function testPropertyDislikes(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/test/Model/TokenTest.php b/test/Model/TokenTest.php new file mode 100644 index 0000000..93d584f --- /dev/null +++ b/test/Model/TokenTest.php @@ -0,0 +1,78 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "token". + */ + public function testPropertyToken(): void + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +}