apimatic / core
Core logic and the utilities for the Apimatic's PHP SDK
Installs: 907 024
Dependents: 34
Suggesters: 0
Security: 0
Stars: 6
Watchers: 4
Forks: 4
Open Issues: 1
Requires
- php: ^7.2 || ^8.0
- ext-curl: *
- ext-dom: *
- ext-json: *
- ext-libxml: *
- apimatic/core-interfaces: ~0.1.5
- apimatic/jsonmapper: ^3.1.1
- php-jsonpointer/php-jsonpointer: ^3.0.2
- psr/log: ^1.1.4 || ^2.0.0 || ^3.0.0
Requires (Dev)
- phan/phan: 5.4.5
- phpunit/phpunit: ^7.5 || ^8.5 || ^9.5
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2025-02-27 06:03:34 UTC
README
Introduction
Core logic and the utilities for the Apimatic's PHP SDK.
Supported PHP Versions
- PHP 7.2
- PHP 7.4
- PHP 8.0
- PHP 8.1
- PHP 8.2
- PHP 8.3
- PHP 8.4
Install the Package
Run the following command to install the package and automatically add the dependency to your composer.json file:
composer require "apimatic/core"
Request
Name | Description |
---|---|
AdditionalFormParams |
Used to add additional form params to a request |
AdditionalHeaderParams |
Used to add additional header params to a request |
AdditionalQueryParams |
Used to add additional query params to a request |
BodyParam |
Body parameter class |
FormParam |
Form parameter class |
HeaderParam |
Header parameter class |
QueryParam |
Query parameter class |
TemplateParam |
Template parameter class |
RequestBuilder |
Used to instantiate a new Request object with the properties provided |
Request |
Request class for an API call |
Response
Name | Description |
---|---|
DeserializableType |
Type handler used to deserialize Enums and DateTime |
ErrorType |
Type handler used to throw exceptions from responses |
ResponseMultiType |
Maps a group of types to response body |
ResponseType |
Maps a model to response body |
ResponseError |
Group of error types for response |
ResponseHandler |
Response handler for an API call that holds all the above response handling features |
Context |
Holds the current context i.e. the current request, response and other needed details |
Logger
Name | Description |
---|---|
ApiLogger |
Provides implementation for logging API requests and responses |
NullApiLogger |
Provides the default implementation for ApiLogger when no logging configuration is provided |
ConsoleLogger |
A LoggerInterface implementation that log messages on console |
LoggerConstants |
Holds constants like NON_SENSITIVE_HEADERS, etc. |
BaseHttpLoggingConfiguration |
Common configurations shared by request and response logging configurations |
LoggingConfiguration |
Provides client's logging configurations |
RequestConfiguration |
Provides request's logging configurations |
ResponseConfiguration |
Provides response's logging configurations |
TestCase
Name | Description |
---|---|
KeysAndValuesBodyMatcher |
Matches actual and expected body, considering both the keys and values |
KeysBodyMatcher |
Matches actual and expected body, considering just the keys |
NativeBodyMatcher |
A body matcher for native values like string, int etc |
RawBodyMatcher |
Exactly matches the body received to expected body |
HeadersMatcher |
Matches the headers received and the headers expected |
StatusCodeMatcher |
Matches the HTTP status codes received to the expected ones |
CoreTestCase |
Main class for a test case that performs assertions w/ all the above matchers |