Download the PHP package gavande/eventy without Composer

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

Eventy (L5.3 Support)

Actions and filters in Laravel. WordPress-style.

Bring the event system you've learned to love to your Laravel project. Eventy (for lack of a better name) is a simple action and filter system.

About

Actions are pieces of code you want to execute at certain points in your code. Actions never return anything, but merely serves as the option to hook in to your existing code without having to mess things up.

Filters are made to modify entities. They always return some kind of value. By default they return their first parameters, and you should too.

Installation

  1. Install using Composer

If you're using Laravel 5.5 you can start using the package at this point. Eventy is auto-discovered by the Laravel framework.

  1. Add the service provider to the providers array in your config/app.php.

  2. Add the facade in config/app.php

Usage

Actions

Anywhere in your code you can create a new action by so:

The first parameter is the name of the hook, you will use this at a later point when you'll be listening to your hook. All subsequent parameters are sent to the action as parameters. These can be anything you'd like. For example you might want to tell the listeners that this is attached to a certain model. Then you would pass this as one of the arguments.

To listen to your hooks, you attach listeners. These are best added to your AppServiceProvider boot() method.

For example if you wanted to hook in to the above hook, you could do:

Again the first argument must be the name of the hook. The second would be a callback. This could be either a Closure, a string referring to a class in the application container (MyNamespace\Http\Listener@myHookListener), an array callback ([$object, 'method']) or a globally registered function function_name. The third argument is the priority of the hook. The lower the number, the earlier the execution. The fourth parameter specifies the number of arguments your listener accepts.

Filters

Filters work in much of the same way as actions, and have the exact same build-up as actions. The most significat difference is that filters always return their value.

To add a filter:

If no listeners are attached to this hook, the filter would simply return 'awesome'.

This is how you add a listener to this filter (still in the AppServiceProvider):

The filter would now return 'not awesome'. Neat!

You could use this in conjunction with the previous hook.

Using in Blade

There are two directives availiable so you can use this in your Blade templates.

Adding the same action as the one in the action example above:

Adding the same filter as the one in the filter example above:


All versions of eventy with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
laravel/framework Version 5.3.*
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 gavande/eventy contains the following files

Loading the files please wait ....