//Initializing JRegistry Object $registry = new JRegistry; //Setting Values $registry->set('name', 'John'); $registry->set('age', 30); //Getting Values $name = $registry->get('name'); //Output: John $age = $registry->get('age'); //Output: 30 //Removing Value $registry->clear('name'); //Checking Value Existence if($registry->has('name')){ //Code } else { //Code }In the above example, we create a new JRegistry object and perform various operations such as setting values, getting values, removing values, and checking value existence. This is useful for storing and retrieving configuration parameters of a Joomla! application. Package Library: The JRegistry class is a part of the Joomla! Framework and is included in the package library named "joomla/registry".