Download the PHP package blessing/filter without Composer

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

filters

Filters API for designing and creating plugin system, within Laravel.

We used this in Blessing Skin Server.

The "Filters API" is similar with Filters API of WordPress, but comes with different API. And this package is designed for Laravel, so it may not work if you use it without Laravel.

💿 Install

Run Composer:

🔨 Usage

With Laravel's Auto-Discovery, you don't need to configure your Laravel application manually.

Currently this package doesn't provide Facade. You must get instance by using type-hint in your controllers or using global resolve() helper function.

For example:

Add a filter

To add a filter for a specified hook, just call the add method:

Note that the filter handler must return a value; otherwise, the value after applied will be null.

You also can pass a class which has a public method called filter as handler.

The class will be resolved from Laravel's service container, so you can use type-hint at the constructor of your class to resolve dependencies.

Additionally, you can specify the priority for your filter handler. Higher integer value indicates that it should come with higher priority.

Default priority is 20.

Apply a hook

You can call apply method to apply a hook:

Then, the second argument you passed will be manipulated by filters.

Also, you can pass additional arguments as an array:

Those additional arguments won't be manipulated by filters.

Remove all filters

To remove all filters for a specified hook, just:

Totally...

This is a full example:

📄 License

MIT License (c) The Blessing Skin Team


All versions of filter with dependencies

PHP Build Version
Package Version
Requires illuminate/contracts Version ^6 || ^7 || ^8 || ^9 || ^10
illuminate/support Version ^6 || ^7 || ^8 || ^9 || ^10
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 blessing/filter contains the following files

Loading the files please wait ....