Download the PHP package engagedc/wp-handler without Composer

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

WP-Handler

This object is a method by which to hide the gritty details of attaching handlers to WordPress action and filter hooks to protected functions within an object. Without it, only public methods of an object are accessible to the WordPress core ecosystem, but with it we can use protected methods as well to help avoid anyone calling a method of our objects in an inappropriate way.

Usage

Simply extend the AbstractHandler object and implement the initialize() method. In that method, you should use the the addAction() and addFilter() methods of the object to attach other methods to WordPress actions and filters. For example:

Both the addAction() and addFilter() methods have similar arguments to WordPress's core add_action() and add_filter() functions: the hook's name, the name of the callback method, the priority at which it's called, and the number of arguments to send your callback. Like the WP Core functions, these last two parameters have default values of 10 and 1 respectively.

Why?

Simply put, having an object with only public methods helps avoid naming collisions, but does not avoid putting all of that code in the global scope where it can be accessed from anywhere. The AbstractHandler object makes sure that your protected methods can only be called on the action/filter hook for which they're intended at the priority level that you provide. Any other attempt to use them will either cause a PHP error (because the methods are protected) or throw a HandlerException.

Additional Objects

There are some additional helper objects in the Pages folder and a few traits in the one named Traits. These are here because they're frequently utilized by handlers to display template files. Conceivably, they could be in their own repo, but since these objects are so often used together, we might decided to let them live in the same one for now.


All versions of wp-handler with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
dashifen/exception Version 1.1.*
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 engagedc/wp-handler contains the following files

Loading the files please wait ....