Download the PHP package hbroker91/php-hookifier without Composer

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

PHP Hookifier

Scrutinizer Code Quality Build Status License

Simple package to add lifecycle hook(s) to any PHP class.

The package consists of two files, an interface and a trait (mixin). In the case of the former, the class must implement the methods provided with the interface, in the latter case it just mixin in the codebase of the class.

The main purpose of this tiny package is, to add one or two interaction point(s) to a class, before its' instantiation or after its' destruction or both. It is useful to check, if various preconditions has been met before allow the execution to run further in the application, e.g. request data checking before calling the class' constructor to instantiate it.

Requirements

Installation

composer require hbroker91/php-hookifier

Usage

Implement the interface in the class where the hook(s) needed, or use the trait with keyword.

Examples:

Using the is similar, for example:

In this case the body is empty, it isn't used.

Pretty straightforward.

Footnote

If you found it useful, plase give a :star:, thank you.

Got questions, ideas, improvement tips?

Feel free to contact me.


All versions of php-hookifier with dependencies

PHP Build Version
Package Version
Requires php Version ^7.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 hbroker91/php-hookifier contains the following files

Loading the files please wait ....