Download the PHP package webservco/jsonapi-application without Composer

On this page you can find all versions of the php package webservco/jsonapi-application. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package jsonapi-application

webservco/jsonapi-application

A PHP component/library. Please see webservco/sandbox for an example project using these types of components.

Request validation, document views, error objects and containers for JSON:API endpoints.


Installation


Usage

This is a shortened version of the APIController in the webservco/sandbox project. The controller's local container implements APILocalServiceContainerInterface.

The module's request handler should offer JSONAPIRendererInterface and JSONRendererInterface as renderers.


Contracts

Interface Implementation Purpose
Contract\Service\JSONAPIHandlerInterface Service\Handler\JSONAPIItemHandler Checks method, content type and version, then fills form fields from data/attributes.
Contract\Factory\Handler\JSONAPIHandlerFactoryInterface Factory\Handler\JSONAPIDefaultHandlerFactory Creates a handler for a list of methods (no fields).
Contract\Service\JSONAPIRequestServiceInterface (webservco/jsonapi) Service\JSONAPIRequestService Content type check, version check and JSON body decoding.
Contract\Service\Container\APILocalServiceContainerInterface Container\APILocalServiceContainer Local container for API controllers.
Contract\Service\Container\APIJSONAPIServiceContainerInterface Container\APIJSONAPIServiceContainer Handler factory and request service.
Contract\Errors\ErrorInterface (webservco/jsonapi) DataTransfer\Errors\DefaultError status, title, detail.
Contract\ViewInterface (webservco/view) View\ItemView, View\CollectionView Top-level document with jsonapi, data or errors, and meta.

Namespaces are relative to WebServCo\JSONAPI\. DataTransfer\Example\* are sample DTOs used by the sandbox project.


Notes

For methods that can have a body, the request must have Content-Type: application/vnd.api+json and "jsonapi": {"version": "1.1"}. Otherwise the handler adds an error with status 400. A GET request skips these checks.

A document has either data or errors. Pass null for the other one, and for jsonapi and meta when you don't need them. They are still encoded, as null.


Development


License

MIT


All versions of jsonapi-application with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
fig/http-message-util Version ^1
psr/http-message Version ^2
webservco/data Version ^2
webservco/dependency-container Version ^2
webservco/form Version ^2
webservco/http Version ^2
webservco/jsonapi Version ^2
webservco/view Version ^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webservco/jsonapi-application contains the following files

Loading the files please wait ...