Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Latest commit

 

History

History
40 lines (27 loc) · 700 Bytes

readme.md

File metadata and controls

40 lines (27 loc) · 700 Bytes

CzProject\Events

Events manager.

Installation

Download a latest package or use Composer:

composer require czproject/events

CzProject\Events requires PHP 5.4.0 or later.

Usage

<?php
$events = new CzProject\Events\Events(array(
	'click',
	'before-delete',
));

$events->addHandler('click', function () {
	// ...
});

$events->addHandler('before-delete', function (Entity\Post $post) {
	// ...
});

$events->fireEvent('click');
$events->fireEvent('before-delete', $post);

License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/