How To Install php-nette-component-model on CentOS 7

In this tutorial we learn how to install php-nette-component-model on CentOS 7. php-nette-component-model is Nette Component Model

Introduction

In this tutorial we learn how to install php-nette-component-model on CentOS 7.

What is php-nette-component-model

Components are the foundation of reusable code. They make your work easier and allow you to profit from community work. Components are wonderful. Nette Framework introduces several classes and interfaces for all these types of components. Object inheritance allows us to have a hierarchic structure of classes like in real world. We can create new classes by extending. These extended classes are descendants of the original class and inherit its parameters and methods. Extended class can add its own parameters and methods to the inherited ones. To use this library, you just have to add, in your project require_once ‘/usr/share/php/Nette/ComponentModel/autoload.php’;

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

Install php-nette-component-model 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-nette-component-model using yum by running the following command:

sudo yum -y install php-nette-component-model

Install php-nette-component-model 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-nette-component-model using dnf by running the following command:

sudo dnf -y install php-nette-component-model

How To Uninstall php-nette-component-model on CentOS 7

To uninstall only the php-nette-component-model package we can use the following command:

sudo dnf remove php-nette-component-model

References

Summary

In this tutorial we learn how to install php-nette-component-model on CentOS 7 using yum and dnf.