Download the PHP package shohel/pluggable without Composer

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

If you like this library, place star ⭐ at this repository and my profile please.

Pluggable

With Pluggable, you can register your actions hooks filter hooks to your PHP Project like WordPress, no matter it's raw PHP project / Laravel / Codeigniter / Moodle LMS / or any others. This is a library that allows you to make your PHP project so extensible.

Installation

Use [Composer] to install the package:

Integration in Laravel

Pluggable has great support for Laravel and comes with a Service Provider for easy integration. The vendor/autoload.php is included by Laravel, so you don't have to require or autoload manually. Just see the instructions below.

After you have installed Pluggable, open your Laravel config file config/app.php and add the following lines.

In the $providers array add the service providers for this package as the very first item.

Now the Pluggable will be auto-loaded by Laravel.

Integration in Any other PHP Project

Include composer autoload file to your project before bootsrap / entry point.

Pluggable will do the rest.

Usage

Action Hook

do_action( string $tag, mixed $arg )

Execute functions hooked on a specific action hook.

This function invokes all functions attached to action hook $tag. It is possible to create new action hooks by simply calling this function, specifying the name of the new hook using the $tag parameter.

Example usage:

Flter Hook

apply_filters( string $tag, mixed $value )

Calls the callback functions that have been added to a filter hook.

The callback functions attached to the filter hook are invoked by calling this function. This function can be used to create a new filter hook by simply calling this function with the name of the new hook specified using the $tag parameter.

Example usage:

Hooks call back from the class

You can reference a class method to hooks callback instead of function, use ['className','callbackMethod'] or use it within a class. [$this,'getStuffDone']

Here is a better way of doing it:

As the hooks will work exactly like WordPress, you can read more about action hooks / filter hooks to WordPress.org documentation.

Action Hooks | Filter Hooks

If you like this library, place star ⭐ at this repository and my profile please.


All versions of pluggable with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 shohel/pluggable contains the following files

Loading the files please wait ....