PHPackages                             filips123/eventy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. filips123/eventy

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

filips123/eventy
================

The WordPress hook system in classic (pure) PHP

0.6(7y ago)854MITPHPPHP &gt;= 5.4.0

Since Jan 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/filips123/eventy)[ Packagist](https://packagist.org/packages/filips123/eventy)[ Docs](https://github.com/filips123/eventy/)[ RSS](/packages/filips123-eventy/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (10)Used By (0)

EventyClassic
=============

[](#eventyclassic)

[![Latest Stable Version](https://camo.githubusercontent.com/2ddaa3ccb1aa9ce6d8a9995adccc16a97c735dffe61166c14c5f3b6e50779bfe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66696c6970733132332f6576656e74792e7376673f7374796c653d666c61742d737175617265266c6162656c3d4c61746573742b537461626c652b56657273696f6e)](https://packagist.org/packages/filips123/eventy/)[![Latest Untable Version](https://camo.githubusercontent.com/c49f1d1a512e1bd0eb3676f21a92494b69411a52791141b5919ab1c845d6de3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f66696c6970733132332f6576656e74792e7376673f7374796c653d666c61742d737175617265266c6162656c3d4c61746573742b556e737461626c652b56657273696f6e)](https://packagist.org/packages/filips123/eventy/)[![Total Downloads](https://camo.githubusercontent.com/10640aca43114af1cb3a950e05b4cf91662527a5a79520e30b15bd74fb6b0084/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66696c6970733132332f6576656e74792e7376673f7374796c653d666c61742d737175617265266c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/filips123/eventy/)[![License](https://camo.githubusercontent.com/3e104508ba6aee250ead03511a02152bd0fc82bdc402964985535e4386b6c3d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f66696c6970733132332f6576656e74792e7376673f7374796c653d666c61742d737175617265266c6162656c3d4c6963656e7365)](https://choosealicense.com/licenses/mit/)[![PHP](https://camo.githubusercontent.com/1d0c37e554bb56f970a2940cc84493acf3a475eec20d9cf7a7d86728a9ab5681/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f66696c6970733132332f6576656e74792e7376673f7374796c653d666c61742d737175617265266c6162656c3d504850)](https://php.net/)

[![Linux Build Status](https://camo.githubusercontent.com/f67caa75c7278724d85a0fff8f018b962da25d003d57632cd8be754299523d2d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f66696c6970733132332f6576656e74792e7376673f7374796c653d666c61742d737175617265266c6162656c3d4c696e75782b4275696c642b537461747573)](https://travis-ci.com/filips123/eventy/)[![Windows Build Status](https://camo.githubusercontent.com/76e3880d94500453a2a7f9c7214f769e81375936c99aa85656bfcfd1970796d2/68747470733a2f2f696d672e736869656c64732e696f2f6170707665796f722f63692f66696c6970733132332f6576656e74792e7376673f7374796c653d666c61742d737175617265266c6162656c3d57696e646f77732b4275696c642b537461747573)](https://ci.appveyor.com/project/filips123/eventy/)[![Code Coverage](https://camo.githubusercontent.com/29f8790ce76a62250513652b99b72cd7912961fb6e5aca74b34eb46a3e2ab808/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f66696c6970733132332f6576656e74792e7376673f7374796c653d666c61742d737175617265266c6162656c3d436f64652b436f766572616765)](https://scrutinizer-ci.com/g/filips123/eventy/code-structure/)[![Code Quality](https://camo.githubusercontent.com/2c4823bd7e3a3405158392336f41bbb0af7cc42e87e250690288df258a516e3d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f66696c6970733132332f6576656e74792e7376673f7374796c653d666c61742d737175617265266c6162656c3d436f64652b5175616c697479)](https://scrutinizer-ci.com/g/filips123/eventy/)

WordPress style actions and filters in classic (pure) PHP.

About
-----

[](#about)

Actions are pieces of code you want to execute at certain points in your code. Actions never return anything but merely serve 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 parameter and you should too.

[Read more about filters](http://www.wpbeginner.com/glossary/filter/)

[Read more about actions](http://www.wpbeginner.com/glossary/action/)

This project is a fork from [Eventy for Laravel](https://github.com/tormjens/eventy/). The difference is that this project supports PHP 5.4 or later and it doesn't have any dependencies. Also, there are some differences in syntax.

Use Cases
---------

[](#use-cases)

EventyClassic is best used as a way to allow extensibility to your code. Whether you're creating a package or an application, Eventy can bring the extensibility you need.

For example, EventyClassic can lay down the foundation for a plugin based system. You offer an "action" that allows plugins to register themselves. You might offer a "filter" so plugins can change the contents of an array in the core. You could even offer an "action" so plugins can modify the menu of your application.

Installation
------------

[](#installation)

### Requirements

[](#requirements)

EventyClassic requires *PHP 5.4.0* or higher.

### Using Composer

[](#using-composer)

The reccomended way to install EventyClassic is with [Composer](https://getcomposer.org/), dependency manager for PHP.

```
composer require filips123/eventy
```

You would only need to include autoloader and namespace in your script.

```
