Download the PHP package wp-kit/invoker without Composer

On this page you can find all versions of the php package wp-kit/invoker. 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 invoker

wp-kit/invoker

This is a wp-kit component that handles the invoking of controllers and closures based on a condition.

This component was built to run within an so is perfect for frameworks such as , and .

Often, WordPress developers want to group their actions and filters in a more defined context but do not want to use a traditional controller and would rather invoke a controller based on a condition rather than a path.

Sure, if we are using we can use , but we cannot pass in closures directly into the condition. With , you can invoke controllers more easily. Examples are below.

Lastly, as expected a is invoked once, and once only during the lifecycle of the application regardless of the number of times the condition is met to invoke the .

Installation

If you're using , install via in the root fo your installtion, otherwise install in your driven theme folder:

Setup

Add Service Provider

Just register the service provider and facade in the providers config and theme config:

Add Facade

If you are using Themosis or another driven framework, you may want to add , simply add them to your aliases:

Add Config File

The recommended method of installing config files for components is via command.

First, install WP CLI, and then install this component, will automatically be installed with , once installed you can run:

For more information, please visit .

Alternatively, you can place the config file(s) in your directory manually.

How To Use

Invoking

This may see back to front in terms of how works however we feel it is more intuitive to lead with the callback when using the Invoker.

Controllers

comes shipped with a that you can extend too to enable you to benefit from the enqueue scripts feature which helps to reduce the amount of code you need to write to output scripts and styles through .

Helpfully, wp-kit comes with two functions to more easily add hooks with reference to the current class. These two functions are action and filter; these functions fallback to the traditional functions add_action and add_filter which means they can be used 100% of the time.

Get Involved

To learn more about how to use check out the docs:

View the Docs

Any help is appreciated. The project is open-source and we encourage you to participate. You can contribute to the project in multiple ways by:

For details about contributing to the framework, please check the contribution guide.

Requirements

Wordpress 4+

PHP 5.6+

License

wp-kit/invoker is open-sourced software licensed under the MIT License.


All versions of invoker with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
wp-kit/utils 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 wp-kit/invoker contains the following files

Loading the files please wait ....