Download the PHP package galatanovidiu/abilities-rest-adapter without Composer

On this page you can find all versions of the php package galatanovidiu/abilities-rest-adapter. 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 abilities-rest-adapter

Abilities REST Adapter

Packagist Version Packagist Downloads

Define a WordPress Abilities API ability by reusing an existing REST API route — its schema, validation, permission check, and handler — instead of re-implementing them. The adapter dispatches the real route via rest_do_request(), so the ability stays behaviorally equivalent to the endpoint.

The signature mirrors core's wp_register_ability( $name, $args ). route, method, label, description, and category are required.

See docs/usage.md for the full guide: the five seams (input_callback / output_callback / input_schema / output_schema / require_permission), collections, the write-safety rule, the permission-error limitation, and the wp ability describe-route command.

Requirements

The dev environment (.wp-env.json) tracks current WordPress trunk (7.1-alpha) so the 7.1 filter is available.

Installation

As a Composer dependency (plugin developers)

Plugin developers can install the adapter as a Composer dependency and use wp_register_ability_from_rest_route() from their own plugin. The package is published on Packagist:

Using Jetpack Autoloader (recommended)

When multiple plugins bundle this adapter, use the Jetpack Autoloader so only the latest shared version loads:

Load it in your main plugin file instead of the standard Composer autoloader:

Using the adapter in your plugin

Check availability and register abilities on wp_abilities_api_init:

See docs/usage.md for the full registration guide.

As a WordPress plugin (recommended for site-wide use)

Install and activate the adapter once; any plugin on the site can call wp_register_ability_from_rest_route().

Download the latest stable release from the GitHub Releases page and install it like any other WordPress plugin. Release ZIPs include the bundled vendor/ directory.

With WP-CLI

From a git checkout

Development

License

MIT


All versions of abilities-rest-adapter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
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 galatanovidiu/abilities-rest-adapter contains the following files

Loading the files please wait ...