Download the PHP package typisttech/wp-contained-hook without Composer

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

WP Contained Hook

Packagist Packagist PHP from Packagist CircleCI codecov GitHub GitHub Sponsor Sponsor via PayPal Hire Typist Tech Twitter Follow @TangRufus

Goals

Using PSR-11 container implementation in WordPress plugins, themes and packages during WordPress action/filter callbacks.

Dependencies are usually lazy loaded(depends on your container implementation), not instantiated until the first time they are used (during WordPress action/filter callbacks).

Installation

Installation should be done via composer, details of how to install composer can be found at https://getcomposer.org/.

You need a psr/container-implementation package as well. This readme uses league/container as an example (any psr/container-implementation works similarly).

Usage

In plain WordPress, the above is similar to:

In WordPress plus container, the above is similar to:

API

TypistTech\WPContainedHook\Loader

Register all actions and filters for the plugin/package/theme.

Maintain a list of all hooks that are registered throughout the plugin, and register them with the WordPress API. Call the run function to execute the list of actions and filters.

Loader Constructor

Example:

Loader::add(HookInterface ...$hooks)

Add new hooks to the collection to be registered with WordPress.

Example:

Loader::run()

Register the hooks to the container and WordPress.

Example:

Hooks: Action and Filter

Holds necessary information for an action or a filter.

Both Action and Filter are subclasses of AbstractHook and implements HookInterface.

AbstractHook Constructor.

Example:

FAQs

Will you add support for older PHP versions?

Never! This plugin will only work on actively supported PHP versions.

Don't use it on end of life or security fixes only PHP versions.

It looks awesome. Where can I find some more goodies like this?

Where can I give :star::star::star::star::star: reviews?

Thanks! Glad you like it. It's important to let my know somebody is using this project. Since this is not hosted on wordpress.org, please consider:

Sponsoring :heart:

Love WP Contained Hook? Help me maintain it, a sponsorship here can help with it.

GitHub Sponsors Matching Fund

Do you know GitHub is going to match your sponsorship?

Sponsor now via GitHub to double your greatness.

Why don't you hire me?

Ready to take freelance WordPress jobs. Contact me via the contact form here or, via email [email protected]

Want to help in other way? Want to be a sponsor?

Contact: Tang Rufus

Running the Tests

Run the tests:

Feedback

Please provide feedback! We want to make this library useful in as many projects as possible. Please submit an issue and point out what you do and don't like, or fork the project and make suggestions. No issue is too small.

Change log

Please see CHANGELOG for more information on what has changed recently.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

WP Contained Hook is a Typist Tech project and maintained by Tang Rufus, freelance developer for hire.

Full list of contributors can be found here.

License

The MIT License (MIT). Please see License File for more information.


All versions of wp-contained-hook with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
psr/container Version ^1.0
psr/container-implementation Version ^1.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 typisttech/wp-contained-hook contains the following files

Loading the files please wait ....