How To Install php-pear-Event-Dispatcher on CentOS 7

In this tutorial we learn how to install php-pear-Event-Dispatcher on CentOS 7. php-pear-Event-Dispatcher is Dispatch notifications using PHP callbacks

Introduction

In this tutorial we learn how to install php-pear-Event-Dispatcher on CentOS 7.

What is php-pear-Event-Dispatcher

The Event_Dispatcher acts as a notification dispatch table. It is used to notify other objects of interesting things. This information is encapsulated in Event_Notification objects. Client objects register themselves with the Event_Dispatcher as observers of specific notifications posted by other objects. When an event occurs, an object posts an appropriate notification to the Event_Dispatcher. The Event_Dispatcher dispatches a message to each registered observer, passing the notification as the sole argument.

We can use yum or dnf to install php-pear-Event-Dispatcher on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install php-pear-Event-Dispatcher.

Install php-pear-Event-Dispatcher on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install php-pear-Event-Dispatcher using yum by running the following command:

sudo yum -y install php-pear-Event-Dispatcher

Install php-pear-Event-Dispatcher on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install php-pear-Event-Dispatcher using dnf by running the following command:

sudo dnf -y install php-pear-Event-Dispatcher

How To Uninstall php-pear-Event-Dispatcher on CentOS 7

To uninstall only the php-pear-Event-Dispatcher package we can use the following command:

sudo dnf remove php-pear-Event-Dispatcher

References

Summary

In this tutorial we learn how to install php-pear-Event-Dispatcher on CentOS 7 using yum and dnf.